in reply to Re: LWP::UserAgent on cygwin and Microsoft Proxy (more data)
in thread LWP::UserAgent on cygwin and Microsoft Proxy

I could not find the place where the whole request is collected to print it out. But hopefully in the HTTP 1.0 protocol implementation this seems to be printed out by the Debug methods (this time I did not care to edit it, and there are double newlines where were the <CR> were):
LWP::UserAgent::new: () LWP::UserAgent::proxy: http http://wawprx01.waw.nestle.pl LWP::UserAgent::request: () LWP::UserAgent::send_request: GET http://www.perlmonks.org?zbyspecialp +arameter=1 LWP::UserAgent::_need_proxy: Proxied to http://wawprx01.waw.nestle.pl LWP::Protocol::http10::request: () LWP::Protocol::http10::request: GET http://www.perlmonks.org?zbyspecia +lparameter=1 HTTP/1.0 Host: www.perlmonks.org User-Agent: MyApp/0.1 libwww-perl/5.68 LWP::Protocol::http10::request: reading response LWP::Protocol::http10::request: HTTP/1.1 400 Bad Request Server: Microsoft-IIS/4.0 Date: Tue, 15 Apr 2003 08:41:24 GMT Content-Type: text/html Content-Length: 87 <html><head><title>Error</title></head><body>The parameter is incorrec +t. </body></html> LWP::Protocol::http10::request: HTTP/1.1 400 Bad Request LWP::Protocol::collect: read 87 bytes LWP::UserAgent::request: Simple response: Bad Request
In the HTTP 1.1 protocol I did check the html output and error code to be the same.

Replies are listed 'Best First'.
Re^3: LWP::UserAgent on cygwin and Microsoft Proxy (more data)
by tye (Sage) on Apr 17, 2003 at 17:02 UTC

    Sorry, took me a bit to get back to this...

    "Server: Microsoft-IIS/4.0" makes it look like the error is indeed coming directly from the MS Proxy but I searched the access logs anyway for Apr 14 and 15 [ just in case it took you a few hours to get around to posting (: ] and there were no instances of "zbyparameter" (so it is MS Proxy complaining).

    I'm curious if an extra or missing "\r" is the culprit. I'd think an MS proxy would be tolerant of such things but I also know that some of their code isn't. I'd probably use "perl -d" to experiment with binmode and/or adding/removing "\r" to what is sent to the proxy.

    You could also get one of the Perl-only HTTP proxies (such as HTTP::Proxy) and use it to see exactly what the proxy receives.

                    - tye
      I've tried binmode and adding/removing "\r" - but with no positive outcome. I am affraid I have no more time for playing with that and I have to leave it in this unresolved state.

      Thank's for your reply.