I have an exasperating problem while using LWP UserAgent to get a Status page from a LinkSys BEFSR41 (from LAN side peer client).
AFTER full 4673 bytes of Status HTML is received from server, LWP sends a redundant terminal request that provokes a 500 "Can't read entity body" response AND wipes out the accumulated LEGITIMATE $response->content.
Same thing happens (500 "Can't read entity body" response) if I use filename method, except that the target file contains the 4673 expected legitimate response bytes; The $response->content is destroyed.
LWP::DebugFile Log:-
# LWP::DebugFile logging to lwp_3ecbccb9_1983.log
# Time now: {1053543619} = Wed May 21 15:00:19 2003
# Time now: {1053543629} = Wed May 21 15:00:29 2003
LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET http://192.168.1.1/Status.htm
LWP::UserAgent::_need_proxy: Not proxied
# Time now: {1053543633} = Wed May 21 15:00:33 2003
LWP::Protocol::http::request: ()
LWP::Protocol::collect: read 340 bytes
LWP::UserAgent::request: Simple response: Unauthorized
# Time now: {1053543634} = Wed May 21 15:00:34 2003
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET http://192.168.1.1/Status.htm
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::Protocol::collect: read 903 bytes
LWP::Protocol::collect: read 3770 bytes
LWP::UserAgent::request: Simple response: Internal Server Error
What can I do to prevent final (apparently redundant) request from destroying $response->content?
Why doesn't $response->content retain accumulated response received?
I could open the file and read the collected response back in; but that's rather defeating the purpose of the UserAgent! ;)
Any clues or suggestions?
Steve
steven.potter@sympatico.ca
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.