How to send a HTTP "Bad Request" Response

Posted by michael on Stack Overflow See other posts from Stack Overflow or by michael
Published on 2010-04-24T08:13:14Z Indexed on 2010/04/24 8:23 UTC
Read the original article Hit count: 344

Filed under:
|

Hi,

I am writing a C program which needs to send back a HTTP Bad Response. This is what I write to socket.

HTTP/1.1 400 Bad Request\r\n
Connection: close\r\n
\r\n

My question is why the broswer still spinning (like appear it is still loading something? Am I missing header in the Http response? OR I miss something else?

Thank you.

© Stack Overflow or respective owner

Related posts about http

Related posts about http-header-fields