-/* $Id$
-
-This file is part of libmsphttp
-Copyright © 2008 Mikkosoft Productions, Mikko Rasa
-Distributed under the LGPL
-*/
-
#include <exception>
#include <msp/core/refptr.h>
#include <msp/net/inet.h>
if(cl.async)
{
cl.sock->write(resp.str());
- cl.sock->close();
cl.stale = true;
}
}
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)
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");
}
}
}
if(response)
{
cl.sock->write(response->str());
- cl.sock->close();
cl.stale = true;
}
}