

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

When trying to login to HN using Lynx, I get a "Post request without Content-Length." error response.<p>Lynx does support POST requests, so what could cause that error?
======
favouriteduck
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.

------
ComputerGuru
I have a lot of problems logging into HN with 3rd party browsers on mobile
phones. Always fails to authenticate.

