Changeset 2353
- Timestamp:
- 2001-05-03T11:44:54+12:00 (23 years ago)
- Location:
- trunk/gsdl/src/w32server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/w32server/httpreq.cpp
r2286 r2353 40 40 #include "httpsend.h" 41 41 #include "cgiwrapper.h" 42 #include "d_winsock.h" 42 43 43 44 /* … … 183 184 //Get Headers 184 185 GetHeadersResult = GetHTTPHeaders(RequestInfo, RequestFields); 186 185 187 //Figure out what version we're dealing with and deal with it 186 188 switch (GetHeadersResult) { … … 275 277 } 276 278 } 277 279 278 280 //Only accept requests from HTTP/0.9 or HTTP/1.X clients, we'll 279 281 //assume that anything else will require an upgrade or patch … … 385 387 RequestFields.ContentLength = atol(RequestFields.ContentLengthStr); 386 388 if (RequestFields.ContentLength > 0) { 387 389 388 390 //Allocate memory 389 391 RequestFields.Content = new BYTE[RequestFields.ContentLength]; … … 400 402 401 403 while (NumRecv < RequestFields.ContentLength) { 402 NumRecv = GetData(RequestInfo.ClientSocket,403 RequestFields.Content + NumRecv,404 RequestFields.ContentLength - NumRecv,405 RequestInfo.ThreadNum);404 NumRecv += GetData(RequestInfo.ClientSocket, 405 RequestFields.Content + NumRecv, 406 RequestFields.ContentLength - NumRecv, 407 RequestInfo.ThreadNum); 406 408 if (NumRecv < 0) return GH_ERROR; 407 409 } 410 411 // It seems to be important on NT that all available data was read 412 // from the socket before the socket is closed (otherwise netscape 413 // throws a "connection reset by peer" error). Since netscape seems 414 // to send a few extra bytes in certain situations we'll make sure we 415 // slurp it all up here. 416 char *tmpbuffer = new char(100); 417 d_recv(RequestInfo.ClientSocket, tmpbuffer, 100, 0); 418 delete tmpbuffer; 419 408 420 } 409 421 else { -
trunk/gsdl/src/w32server/netio.cpp
r2286 r2353 79 79 80 80 //Clean up Winsock 81 d_WSACleanup() == SOCKET_ERROR;81 d_WSACleanup(); 82 82 } 83 83
Note:
See TracChangeset
for help on using the changeset viewer.