Update of /cvsroot/boost/boost/libs/asio/example/http/server2
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14020/http/server2
Modified Files:
request_handler.cpp
Log Message:
Add handling for URL-escaping of spaces as plus signs. Remove unnecessary
slash from request path.
Index: request_handler.cpp
===================================================================
RCS file:
/cvsroot/boost/boost/libs/asio/example/http/server2/request_handler.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- request_handler.cpp 20 May 2007 02:52:00 -0000 1.2
+++ request_handler.cpp 21 Jun 2007 23:39:21 -0000 1.3
@@ -59,7 +59,7 @@
}
// Open the file to send back.
- std::string full_path = doc_root_ + "/" + request_path;
+ std::string full_path = doc_root_ + request_path;
std::ifstream is(full_path.c_str(), std::ios::in | std::ios::binary);
if (!is)
{
@@ -106,6 +106,10 @@
return false;
}
}
+ else if (in[i] == '+')
+ {
+ out += ' ';
+ }
else
{
out += in[i];
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs