Ask HN: Why can't I login to HN using Lynx?

4 points by julienc ↗ HN
When trying to login to HN using Lynx, I get a "Post request without Content-Length." error response.

Lynx does support POST requests, so what could cause that error?

2 comments

[ 5.4 ms ] story [ 57.8 ms ] thread
I have a lot of problems logging into HN with 3rd party browsers on mobile phones. Always fails to authenticate.
I'm guessing the HN web server has a particularly narrow interpretation of the HTTP/1.1 spec:

    For compatibility with HTTP/1.0 applications, HTTP/1.1
    requests containing a message-body MUST include a valid
    Content-Length header field unless the server is known
    to be HTTP/1.1 compliant. If a request contains a 
    message-body and a Content-Length is not given, the
    server SHOULD respond with 400 (bad request) if it
    cannot determine the length of the message, or with
    411 (length required) if it wishes to insist on 
    receiving a valid Content-Length.
In this case Lynx knows HN is a HTTP/1.1 server and so doesn't bother with Content-Length. That makes the server code a more complicated so I guess it just hasn't been coded.