vsespb has asked for the wisdom of the Perl Monks concerning the following question:
And then run LWP and paste something like this into "nc" windownc -l 9903
I will get in 'lwp' window:HTTP/1.1 200 OK Content-Length: 133 LNJKjadfkj ^C
So it's detected as success request. But tools like curl/wget report this as error/warning or even retry.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
When a message-body is included with a message, the transfer-length of that body is determined by one of the following (in order of precedence):...
3. If a Content-Length header field (section 14.13) is present, its decimal value in OCTETs represents both the entity-length and the transfer-length...
5.By the server closing the connection.Am I missing something?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Should LWP warn about wrong Content-Length? (it does)
by Anonymous Monk on May 30, 2013 at 08:09 UTC | |
by vsespb (Chaplain) on May 30, 2013 at 08:42 UTC | |
by Anonymous Monk on May 30, 2013 at 09:01 UTC | |
by vsespb (Chaplain) on May 30, 2013 at 09:06 UTC |