in reply to Re: Mysterious LWP status 500 Line too long
in thread Mysterious LWP status 500 Line too long

Hey, thanks, that works! At least, when I specify a limit of 64k.

I took a closer look at the response from the switch. The beginning of it looks like this:

<HTML><BODY BGCOLOR=#ffffff>
Note that there are *no* <HEAD> tags in there. Would that be causing this problem?

Thanks,
-dpmott

Update: There is no HTTP Header in the response, either. The response from the switch begins with the <HTML> tag

Replies are listed 'Best First'.
Re^3: Mysterious LWP status 500 Line too long
by ikegami (Patriarch) on Jul 28, 2005 at 17:58 UTC

    The problem is with the header of the HTTP request. That's the body. An HTTP response looks like:

    HTTP/1.0 200 OK<CR><LF> Header: Value<CR><LF> Header: Value<CR><LF> Header: Value<CR><LF> <CR><LF> body

    The blank line seperates the header from the body.

    By the way, I think 0 means no limit.

      I've double-checked the TCP/IP packets coming from the switch.

      There are *no* HTTP headers. The content from the switch starts with the <HTML> tag.

      So, it looks like LWP is expecting a header that never comes, and fills up its buffer with the HTML content.

      Is there a way that I can tell LWP to *not* expect the header?

        Wait, if there was no header, it should die (die "Bad response status line: '$status'" unless $laxed;)

        The status line is considered part of the header. A minimal header would be:

        HTTP/1.0 200 OK<CR><LF> <CR><LF> body

        Is the status line missing? Is the blank link missing?

        Anyway, you'll probably have to drop LWP and create your own socket.