Changeset 3017


Ignore:
Timestamp:
2002-02-27T15:19:35+13:00 (22 years ago)
Author:
jrm21
Message:

Added code to handle IE's fking stupid behaviour of sending "special"
HTTP requests whenever it wants to download a file in any of the MS Office
file formats, and then explorer would hang because it got no data in the
response.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/w32server/httpreq.cpp

    r2353 r3017  
    9090*/
    9191int GetHTTPHeaders(RequestInfoT &RequestInfo, RequestFieldsT &RequestFields);
     92#define GH_BAD_METHOD      -2
    9293#define GH_ERROR           -1
    9394#define GH_UNKNOWN_VERSION  0
     
    198199      SendHTTPError(400, "HTTP Version not supported", "Only 1.x requests supported", RequestInfo, RequestFields);
    199200      // TrayIncNumServed();
     201      break;
     202/* added Feb 2002 to handle stupid MS behaviour */
     203    case GH_BAD_METHOD :
     204      SendHTTPError(501, "Not implemented", "Only GET and POST currently implemented", RequestInfo, RequestFields);
    200205      break;
    201206    case GH_ERROR:
     
    247252  GetWord(RequestFields.MethodStr, CurLine, Start, End);
    248253  CharUpper(RequestFields.MethodStr);
    249  
     254
     255  /* Added Feb 2002 - IE since about version 5 send stupid frontpage requests
     256     for MS Document formats eg "GET /_vti_inf.html" */
     257  if (strcmp(RequestFields.MethodStr,"OPTIONS")==0) {
     258    return GH_BAD_METHOD;
     259  }
    250260  //Version String (last word)
    251261  GetLastWord(RequestFields.VersionStr, CurLine, Start);
Note: See TracChangeset for help on using the changeset viewer.