X-Git-Url: http://git.tdb.fi/?p=libs%2Fnet.git;a=blobdiff_plain;f=source%2Fhttp%2Fserver.cpp;h=ed3a2b9288339830ee89f0b56585960ddb24d398;hp=e0b34b382e8a9d86e0a9c0a862a2a9250fa2220a;hb=5f6c5ae5527619f7ffc82a69cf73d3fc7347e51f;hpb=8286d850ba8451e6acdad5f2083b8fb324e84717 diff --git a/source/http/server.cpp b/source/http/server.cpp index e0b34b3..ed3a2b9 100644 --- a/source/http/server.cpp +++ b/source/http/server.cpp @@ -106,6 +106,11 @@ void Server::client_data_available(Client &cl) response = new Response(NOT_IMPLEMENTED); response->add_content("Method not implemented\n"); } + else if(cl.request->get_path()[0]!='/') + { + response = new Response(BAD_REQUEST); + response->add_content("Path must be absolute\n"); + } } catch(const exception &e) {