Changeset 97 for trunk/thirds


Ignore:
Timestamp:
Jan 30, 2011, 7:06:08 PM (10 years ago)
Author:
djay
Message:

Keep the default behavior to correctly decode url. Avoid any decoding when the method is POST.

Location:
trunk/thirds/cgic206
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/thirds/cgic206/cgic.c

    r96 r97  
    6565char *cgiCookie;
    6666int cgiContentLength;
     67int cgiTreatUrlEncoding;
    6768char *cgiAccept;
    6869char *cgiUserAgent;
     
    231232
    232233
     234        cgiTreatUrlEncoding=1;
    233235        if (cgiStrEqNc(cgiRequestMethod, "post")) {
     236                cgiTreatUrlEncoding=0;
    234237#ifdef CGICDEBUG
    235238                CGICDEBUGSTART
     
    11061109        while (srcPos < len) {
    11071110                int ch = cp[srcPos];
     1111                if(cgiTreatUrlEncoding==1)
    11081112                switch (escapeState) {
    11091113                        case cgiEscapeRest:
    11101114                        if (ch == '%') {
    11111115                                escapeState = cgiEscapeFirst;
    1112                         } /*else if (ch == '+') {
     1116                        } else if (ch == '+') {
    11131117                                s[dstPos++] = ' ';
    1114                         } */else {
    1115                                 s[dstPos++] = ch;       
     1118                        } else {
     1119                                s[dstPos++] = ch;
    11161120                        }
    11171121                        break;
     
    11261130                        break;
    11271131                }
     1132                else
     1133                  s[dstPos++] = ch;
    11281134                srcPos++;
    11291135        }
  • trunk/thirds/cgic206/cgic.h

    r1 r97  
    139139#endif
    140140int cgiContentLength;
     141
     142extern
     143#ifdef __cplusplus
     144"C"
     145#endif
     146int cgiTreatUrlEncoding;
    141147
    142148/* Pointer to CGI output. The cgiHeader functions should be used
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png