Update of /cvsroot/mod-c/ehtml/src
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15830/src
Modified Files:
Request.cpp
Log Message:
My previous commit introduced a bug: when Content-Type is multipart/form-data (aka file upload), the content was not processed at all (due to an unitialized 'state' variable).
Added a check for unknown states in Request::ParseQuery().
Index: Request.cpp
===================================================================
RCS file: /cvsroot/mod-c/ehtml/src/Request.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** Request.cpp 8 Mar 2007 17:44:20 -0000 1.27
--- Request.cpp 9 Mar 2007 19:55:06 -0000 1.28
***************
*** 101,105 ****
content = new char[length+1];
! char state;
char* varname;
--- 101,105 ----
content = new char[length+1];
! char state = 0; // 'h', 'v', 'F', 'p', 'd', 'f'
char* varname;
***************
*** 384,387 ****
--- 384,389 ----
nbytes = 0;
break;
+ default:
+ assert(0 && "Unknown state");
}
} while (again);
|