Single instance HTTP Server using new Ethernet Interface with bug fix for URL arguments
Fork of HTTPServer by
Diff: HTTPConnection.cpp
- Revision:
- 9:c2a1462b9b71
- Parent:
- 6:fe661fa9d18a
- Child:
- 11:3943841e1798
--- a/HTTPConnection.cpp Sat Jun 01 17:47:45 2013 +0000 +++ b/HTTPConnection.cpp Sun Jun 02 00:33:56 2013 +0000 @@ -58,7 +58,7 @@ int rcvd= 0; - INFO("[HTTPConnection]Waiting for new data in connection"); + INFO("Waiting for new data in connection"); // Try receiving request line rcvd = receiveLine(buffer, 255, 3000); if (rcvd == -1) { @@ -73,7 +73,7 @@ if (rcvd == -1) { // Invalid content received, so close the connection INFO("Invalid message received, so sending negative response and closing connection !"); - sprintf(buffer,"HTTP/1.1 400 NOK\n\rContent-Length: %d\n\rContent-Type: text\n\rConnection: Close\n\r\n\r",0); + sprintf(buffer,"HTTP/1.0 400 BadRequest\n\rContent-Length: %d\n\rContent-Type: text\n\rConnection: Close\n\r\n\r",0); m_Tcp.set_blocking(true, 1500); m_Tcp.send(buffer,strlen(buffer)); close();