[Wellington-pm] Problems with HTTPS through LWP.

michael at diaspora.gen.nz michael at diaspora.gen.nz
Mon Jun 19 17:01:15 PDT 2006


Srdjan writes:
>I'm out for lunch, but what's the aoutput of respone->as_string? 500 is client
>assigned code, ie not the response from server.
>I bet it's a timeout...

Nope.  As I said, it's a failed read call, returning undef rather than 0.

To be more exact, LWP::Protocol::collect seems to execute 1 read
(as a call to Net::HTTP::Methods::my_read, via read_entity_body in
the same package) that returns 4096 bytes; another that returns 375
bytes; and then a third, which returns undef, which in turn causes
LWP::Protocol::http::request in the anonymous function passed to collect
to, well, die.

What should be returned is 0 (indicating EOF), which seems to happen in
cases that I haven't tracked down yet.

The 500 is either 'Can't read entity body', or 'Internal server error'.
Seems to vary.

Bizarre, eh?

(Thanks for reading the email -- it seemed a little bit dense as I was
writing it...)

    -- michael.


More information about the Wellington-pm mailing list