|
From: <mik...@us...> - 2004-01-01 14:51:04
|
Update of /cvsroot/sharedaemon/sharedaemon-ui-web/src/server/http
In directory sc8-pr-cvs1:/tmp/cvs-serv9842/src/server/http
Modified Files:
HttpRequest.cpp
Log Message:
01/01/2004 Mikael Barbeaux
* Fixed a bug while parsing query string of http request.
* Basic implementation for method processors ( GET, HEAD and POST ).
Index: HttpRequest.cpp
===================================================================
RCS file: /cvsroot/sharedaemon/sharedaemon-ui-web/src/server/http/HttpRequest.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- HttpRequest.cpp 26 Dec 2003 22:56:41 -0000 1.1
+++ HttpRequest.cpp 1 Jan 2004 14:51:00 -0000 1.2
@@ -100,7 +100,8 @@
string r_uri = req_str.substr(start, pos - start);
// Retrieving parameters if any...
unsigned int ind;
- if((ind = r_uri.find("?", 0)) != string::npos) {
+ if(((ind = r_uri.find("?", 0)) != string::npos) &&
+ (ind != (r_uri.size()-1))) {
// parse query string for parameters
parseQueryString(r_uri.substr(ind+1,r_uri.length()));
}
|