Changeset 2280 for trunk/gsdl/src/w32server/cgiwrapper.cpp
- Timestamp:
- 2001-04-04T22:37:36+12:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/w32server/cgiwrapper.cpp
r2212 r2280 766 766 } 767 767 768 int ExamineURIStr( char *URIStr, RequestInfoT *RequestInfo,768 int ExamineURIStr(text_t &URIStr, RequestInfoT *RequestInfo, 769 769 RequestFieldsT *RequestFields) 770 770 { 771 771 char *protocol, *machine, *rest; int port; 772 char URICopyA[MAX_URL_SIZE], URICopyB[MAX_URL_SIZE];772 // char URICopyA[MAX_URL_SIZE], URICopyB[MAX_URL_SIZE]; 773 773 774 774 if (RequestFields->ContentLength > 0) { 775 775 // POST data 776 int len = strlen (URIStr); 776 URIStr.push_back('?'); 777 URIStr += (char*)RequestFields->Content; 778 779 // int len = strlen (URIStr); 777 780 // fail relatively gracefully (and mysteriously) if POST 778 781 // arguments are too long 779 if (len + RequestFields->ContentLength + 1 <= MAX_URL_SIZE) { 780 URIStr[len] = '?'; len ++; 781 for (int i = 0; i < RequestFields->ContentLength; i++) { 782 URIStr[len] = RequestFields->Content[i]; 783 len ++; 784 } 785 URIStr[len] = '\0'; 786 } else { 787 MessageBox (NULL, "POST data too long", "Greenstone Digital Library Software", MB_OK); 788 } 789 } 790 791 strcpy(URICopyA,URIStr); 782 // if (len + RequestFields->ContentLength + 1 <= MAX_URL_SIZE) { 783 // URIStr[len] = '?'; len ++; 784 // for (int i = 0; i < RequestFields->ContentLength; i++) { 785 // URIStr[len] = RequestFields->Content[i]; 786 // len ++; 787 // } 788 // URIStr[len] = '\0'; 789 // } else { 790 // MessageBox (NULL, "POST data too long", "Greenstone Digital Library Software", MB_OK); 791 // } 792 } 793 794 char *URICopyA = URIStr.getcstr(); 795 char URICopyB[MAX_URL_SIZE]; 796 char *URICopytmp = URIStr.getcstr(); 797 798 // strcpy(URICopyA,URIStr); 792 799 793 800 if (parse_url(URICopyA,&protocol,&machine,&port,&rest)!=http_ok) { 794 801 /* Alter local file request to address 'gsdl' */ 795 fix_prefix(URICopyB, "http://gsdl", URIStr); 802 // fix_prefix(URICopyB, "http://gsdl", URIStr); 803 fix_prefix(URICopyB, "http://gsdl", URICopytmp); 796 804 URIStr = URICopyB; 797 805 strcpy(URICopyA, URICopyB);
Note:
See TracChangeset
for help on using the changeset viewer.