in reply to LWP::UserAgent on cygwin and Microsoft Proxy

It'd help to know what those 87 bytes were.

If you'd like to add a nonsense ?unusedparam=sillyvalue (make up your own, please) to your request and /msg me, I'll look in the access logs for one more datum.

                - tye
  • Comment on Re: LWP::UserAgent on cygwin and Microsoft Proxy (more data)

Replies are listed 'Best First'.
Re: Re: LWP::UserAgent on cygwin and Microsoft Proxy (more data)
by RMGir (Prior) on Apr 14, 2003 at 17:10 UTC
    That will work if he's actually getting past the proxy, but I thought the message he was getting was the proxy complaining about a bad request.

    You're right, it would be nice to know what the 87 bytes are.
    --
    Mike

      No, it also "will work" to determine if you've jumped to the right conclusion or not. I didn't feel the source of the "Bad Request" response was clearly indicated as being the proxy (that'd seem more likely but when investigating bugs, I prefer to verify such conclusions).

                      - tye
Re: Re: LWP::UserAgent on cygwin and Microsoft Proxy (more data)
by zby (Vicar) on Apr 15, 2003 at 08:49 UTC
    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.

      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.