]> git.tdb.fi Git - libs/net.git/commitdiff
Add linefeeds to error response content
authorMikko Rasa <tdb@tdb.fi>
Sat, 6 Aug 2011 20:59:00 +0000 (23:59 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 7 Aug 2011 08:46:28 +0000 (11:46 +0300)
source/server.cpp

index 45bf69b285bef06da567dc599160bdd44f30dc36..2fcfb90055933e036bbc7c71d3216a41020bddf7 100644 (file)
@@ -99,7 +99,7 @@ void Server::client_data_available(Client &cl)
                                if(cl.request->get_method()!="GET" && cl.request->get_method()!="POST")
                                {
                                        response = new Response(NOT_IMPLEMENTED);
-                                       response->add_content("Method not implemented");
+                                       response->add_content("Method not implemented\n");
                                }
                        }
                        catch(const exception &e)
@@ -131,7 +131,7 @@ void Server::client_data_available(Client &cl)
                                if(response->get_status()==NONE)
                                {
                                        response = new Response(NOT_FOUND);
-                                       response->add_content("The requested resource was not found");
+                                       response->add_content("The requested resource was not found\n");
                                }
                        }
                }