From: oes Date: Wed, 4 Sep 2002 15:17:28 +0000 (+0000) Subject: Synced with the stable branch: X-Git-Tag: v_3_1_archive_branchpoint~193 X-Git-Url: http://www.privoxy.org/gitweb/?a=commitdiff_plain;h=ae61631397a33cb69f721220adb89ad502f6bd07;p=privoxy.git Synced with the stable branch: Revision 1.70.2.1 2002/08/05 11:17:46 oes Fixed Bug #587820, i.e. added workaround for IE bug that includes fragment identifier in (cgi) query --- diff --git a/src/cgi.c b/src/cgi.c index 7e3fb739..3d2cc8b9 100644 --- a/src/cgi.c +++ b/src/cgi.c @@ -1,4 +1,4 @@ -const char cgi_rcs[] = "$Id: cgi.c,v 2.0 2002/06/04 14:34:21 jongfoster Exp $"; +const char cgi_rcs[] = "$Id: cgi.c,v 2.1 2002/06/04 17:55:24 jongfoster Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/src/cgi.c,v $ @@ -38,6 +38,9 @@ const char cgi_rcs[] = "$Id: cgi.c,v 2.0 2002/06/04 14:34:21 jongfoster Exp $"; * * Revisions : * $Log: cgi.c,v $ + * Revision 2.1 2002/06/04 17:55:24 jongfoster + * Adding comments + * * Revision 2.0 2002/06/04 14:34:21 jongfoster * Moving source files to src/ * @@ -818,6 +821,16 @@ static struct map *parse_cgi_parameters(char *argstring) return NULL; } + /* + * IE 5 does, of course, violate RFC 2316 Sect 4.1 and sends + * the fragment identifier along with the request, so we must + * cut it off here, so it won't pollute the CGI params: + */ + if (NULL != (p = strchr(argstring, '#'))) + { + *p = '\0'; + } + pairs = ssplit(argstring, "&", vector, SZ(vector), 1, 1); for (i = 0; i < pairs; i++)