Changeset 1624 for trunk/gsdl


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

Got POST data to work for local library

Location:
trunk/gsdl/src/w32server
Files:
2 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 
  • trunk/gsdl/src/w32server/locate.h

    r611 r1624  
    1 #define MAX_URL_SIZE 256
     1//#define MAX_URL_SIZE 256
     2// now kind of long to allow for post data
     3#define MAX_URL_SIZE 4096
    24
    35extern HWND GSDL_Window;
Note: See TracChangeset for help on using the changeset viewer.