X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/a143e957a68145eece4b5b60e0bf8bee0d0693cd..b92547a5de3a3fb4f14a2bea4a4e776b8da3cb5c:/Server/src/httpheaders.cpp?ds=inline diff --git a/Server/src/httpheaders.cpp b/Server/src/httpheaders.cpp index cef6d05..89d8de4 100644 --- a/Server/src/httpheaders.cpp +++ b/Server/src/httpheaders.cpp @@ -26,13 +26,17 @@ // #include "plaqui/server/httpheaders.h" +#include "plaqui/server/string.h" //#include #ifdef DEBUG # include #endif // DEBUG using namespace std; -using namespace PlaQui::Server; + +namespace PlaQui { + +namespace Server { HTTPHeaders::~HTTPHeaders(void) { #ifdef DEBUG @@ -52,7 +56,7 @@ istream& operator>>(istream& is, HTTPHeaders& h) { // FIXME poner mejores excepciones. throw "Wrong header"; } - h[sbuf.substr(0, pos)] = sbuf.substr(pos + 1); + h[sbuf.substr(0, pos)] = String(sbuf.substr(pos + 1)).trim(); return is; } @@ -67,3 +71,7 @@ ostream& operator<<(ostream& os, const HTTPHeaders& h) { return os; } +} // namespace Server + +} // namespace PlaQui +