in reply to Re: LWP::UserAgent destroys $response->content >:{
in thread LWP::UserAgent destroys $response->content >:{

No, it is LWP that is giving the error "Can't read entity body". That is from LWP/Protocol/http.pm (line 338 in the version I have). It is giving that error because the LinkSys reset the socket connection instead of closing it (or at least LWP thinks that's what happened). It could be a bug in LWP or the FreeBSD TCP/IP layer, but it could also be a bug in the LinkSys (somewhat more likely, I think).
  • Comment on Re: Re: LWP::UserAgent destroys $response->content >:{

Replies are listed 'Best First'.
Re: Re: Re: LWP::UserAgent destroys $response->content >:{
by SPotter (Initiate) on May 22, 2003 at 20:08 UTC
    So, Shall I dispense with the UserAgent Request and run it through lower level code? >:-{ (Defeating the purpose of UserAgent) (Not a satisfactory solution)

    OR

    Use the filename method and use a 'length of file (= length of response)' test before assuming that UserAgent error response is valid (i.e. rebuild the response->content from the collected file copy if response is not 'too short'? (A workable patch - maybe)

    OR

    Get LinkSys to check their disconnect logic? (Not likely)

    Start debugging lower layers? (Well, that's the same as the first idea (Not a satisfactory solution - and no guarantee of success.

    Guess I'll put in a response (in file) length test to validate UserAgent error - bleearghr ;)

    Unless someone can help me with the lower level stuff.

    {"Why don't you do it in Perl?" - Well, one has to start somewhere! ;))) }

    Steve Potter
    http://www3.sympatico.ca/steven.potter/