Fossil SCM

Minor tweaks prior to merging.

drh 2019-09-05 02:31 noJsonCgiFlag
Commit 4231d4b6343d6afbf6a4c3317f4abce461e1584987eac995e1ca0afc2c2b5264
1 file changed +4 -2
+4 -2
--- src/cgi.c
+++ src/cgi.c
@@ -493,11 +493,13 @@
493493
** zName is the name of the query parameter or cookie and zValue
494494
** is its fully decoded value. zName will be modified to be an
495495
** all lowercase string.
496496
**
497497
** zName and zValue are not copied and must not change or be
498
-** deallocated after this routine returns.
498
+** deallocated after this routine returns. This routine changes
499
+** all ASCII alphabetic characters in zName to lower case. The
500
+** caller must not change them back.
499501
*/
500502
void cgi_set_parameter_nocopy_tolower(
501503
char *zName,
502504
const char *zValue,
503505
int isQP
@@ -1040,11 +1042,11 @@
10401042
10411043
len = atoi(PD("CONTENT_LENGTH", "0"));
10421044
zType = P("CONTENT_TYPE");
10431045
zSemi = zType ? strchr(zType, ';') : 0;
10441046
if( zSemi ){
1045
- g.zContentType = mprintf("%.*s", zSemi-zType, zType);
1047
+ g.zContentType = mprintf("%.*s", (int)(zSemi-zType), zType);
10461048
zType = g.zContentType;
10471049
}else{
10481050
g.zContentType = zType;
10491051
}
10501052
blob_zero(&g.cgiIn);
10511053
--- src/cgi.c
+++ src/cgi.c
@@ -493,11 +493,13 @@
493 ** zName is the name of the query parameter or cookie and zValue
494 ** is its fully decoded value. zName will be modified to be an
495 ** all lowercase string.
496 **
497 ** zName and zValue are not copied and must not change or be
498 ** deallocated after this routine returns.
 
 
499 */
500 void cgi_set_parameter_nocopy_tolower(
501 char *zName,
502 const char *zValue,
503 int isQP
@@ -1040,11 +1042,11 @@
1040
1041 len = atoi(PD("CONTENT_LENGTH", "0"));
1042 zType = P("CONTENT_TYPE");
1043 zSemi = zType ? strchr(zType, ';') : 0;
1044 if( zSemi ){
1045 g.zContentType = mprintf("%.*s", zSemi-zType, zType);
1046 zType = g.zContentType;
1047 }else{
1048 g.zContentType = zType;
1049 }
1050 blob_zero(&g.cgiIn);
1051
--- src/cgi.c
+++ src/cgi.c
@@ -493,11 +493,13 @@
493 ** zName is the name of the query parameter or cookie and zValue
494 ** is its fully decoded value. zName will be modified to be an
495 ** all lowercase string.
496 **
497 ** zName and zValue are not copied and must not change or be
498 ** deallocated after this routine returns. This routine changes
499 ** all ASCII alphabetic characters in zName to lower case. The
500 ** caller must not change them back.
501 */
502 void cgi_set_parameter_nocopy_tolower(
503 char *zName,
504 const char *zValue,
505 int isQP
@@ -1040,11 +1042,11 @@
1042
1043 len = atoi(PD("CONTENT_LENGTH", "0"));
1044 zType = P("CONTENT_TYPE");
1045 zSemi = zType ? strchr(zType, ';') : 0;
1046 if( zSemi ){
1047 g.zContentType = mprintf("%.*s", (int)(zSemi-zType), zType);
1048 zType = g.zContentType;
1049 }else{
1050 g.zContentType = zType;
1051 }
1052 blob_zero(&g.cgiIn);
1053

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button