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

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.

Replies are listed 'Best First'.
Re^4: Mysterious LWP status 500 Line too long
by dpmott (Scribe) on Jul 28, 2005 at 18:57 UTC
    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.