Ignore:
Timestamp:
2000-10-27T16:23:59+13:00 (24 years ago)
Author:
sjboddie
Message:

Got POST data to work for local library

File:
1 edited

Legend:

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

    r1615 r1624  
    762762  char *protocol, *machine, *rest;  int port;
    763763  char URICopyA[MAX_URL_SIZE], URICopyB[MAX_URL_SIZE];
     764
     765  if (RequestFields->ContentLength > 0) {
     766    // POST data
     767    int len = strlen (URIStr);
     768    // fail relatively gracefully (and mysteriously) if POST
     769    // arguments are too long
     770    if (len + RequestFields->ContentLength + 1 <= MAX_URL_SIZE) {
     771      URIStr[len] = '?'; len ++;
     772      for (int i = 0; i < RequestFields->ContentLength; i++) {
     773    URIStr[len] = RequestFields->Content[i];
     774    len ++;
     775      }
     776      URIStr[len] = '\0';
     777    }
     778  }
     779
    764780  strcpy(URICopyA,URIStr);
    765781 
Note: See TracChangeset for help on using the changeset viewer.