Differences From:
File
src/cgi.c
part of check-in
[df97fae2bd]
- Patches to get Fossil working on OS/2. Ticket 89bec0d9aa9f30
by
drh on
2009-08-29 17:01:33.
[view]
To:
File
src/cgi.c
part of check-in
[7a2c37063a]
- merge trunk into creole branch
by
bob on
2009-09-22 07:49:39.
Also file
src/cgi.c
part of check-in
[fac950a173]
- Update to the latest version of SQLite. Make use of the new
sqlite3_strnicmp() interface.
by
drh on
2009-09-09 16:14:08.
[view]
@@ -71,15 +71,8 @@
#endif /* INTERFACE */
/*
-** Provide a reliable implementation of a caseless string comparison
-** function.
-*/
-#define stricmp sqlite3StrICmp
-extern int sqlite3StrICmp(const char*, const char*);
-
-/*
** The HTTP reply is generated in two pieces: the header and the body.
** These pieces are generated separately because they are not necessary
** produced in order. Parts of the header might be built after all or
** part of the body. The header and body are accumulated in separate
@@ -645,19 +638,20 @@
}else{
nArg = tokenize_line(zLine, sizeof(azArg)/sizeof(azArg[0]), azArg);
for(i=0; i<nArg; i++){
int c = tolower(azArg[i][0]);
- if( c=='c' && stricmp(azArg[i],"content-disposition:")==0 ){
+ int n = strlen(azArg[i]);
+ if( c=='c' && sqlite3_strnicmp(azArg[i],"content-disposition:",n)==0 ){
i++;
- }else if( c=='n' && stricmp(azArg[i],"name=")==0 ){
+ }else if( c=='n' && sqlite3_strnicmp(azArg[i],"name=",n)==0 ){
zName = azArg[++i];
- }else if( c=='f' && stricmp(azArg[i],"filename=")==0 ){
+ }else if( c=='f' && sqlite3_strnicmp(azArg[i],"filename=",n)==0 ){
char *z = azArg[++i];
if( zName && z && islower(zName[0]) ){
cgi_set_parameter_nocopy(mprintf("%s:filename",zName), z);
}
showBytes = 1;
- }else if( c=='c' && stricmp(azArg[i],"content-type:")==0 ){
+ }else if( c=='c' && sqlite3_strnicmp(azArg[i],"content-type:",n)==0 ){
char *z = azArg[++i];
if( zName && z && islower(zName[0]) ){
cgi_set_parameter_nocopy(mprintf("%s:mimetype",zName), z);
}