Subject: | Response content-length not validated. |
If server closes connection, after sending headers, LWP does not
validate Content-Length
Some PoC code here http://www.perlmonks.org/?node_id=1035977
Example of response that 'GET' tool returns:
GET -S -e http://localhost:9903/
GET http://localhost:9903/ --> 200 OK
Content-Length: 133
Client-Date: Thu, 30 May 2013 06:41:09 GMT
Client-Peer: 127.0.0.1:9903
Client-Response-Num: 1
LNJKjadfkj
Also experience same problem in real application (without GET tool)
(with callbacks (content_file, content_cb), in SSL mode with Amazon AWS servers.)
I am not sure if this a bug, or expected behaviour or just should be documented.
But I think it could be handler with headers similar to X-Died or Client-Warning.