openbsd-ports/devel/cvstrac/patches/patch-cgi_c
sthen d068153915 import cvstrac; N.B. requires a recent /usr/bin/rlog (thanks Joris!)
CVSTrac implements a patch-set and bug tracking system for CVS
as a single self-contained executable, running as CGI, from inetd,
or as a stand-alone web server.

- Automatically generates a patch-set log from check-in comments
- User-defined color-coded database queries
- Built-in repository browser and Wiki
- Minimal memory, disk and CPU requirements
- Per-user access control
- Uses SQLite, no heavy database engine dependency
- Can be run from a chroot jail
2009-02-17 00:16:04 +00:00

44 lines
1.7 KiB
Plaintext

$OpenBSD: patch-cgi_c,v 1.1.1.1 2009/02/17 00:16:04 sthen Exp $
http://www.cvstrac.org/cvstrac/chngview?cn=994
Avoid using sqlite internal functions.
--- cgi.c.orig Thu Dec 14 00:45:51 2006
+++ cgi.c Thu Aug 7 01:01:25 2008
@@ -57,13 +57,6 @@
#endif /* INTERFACE */
/*
-** Provide a reliable implementation of a caseless string comparison
-** function.
-*/
-#define stricmp sqlite3StrICmp
-extern int sqlite3StrICmp(const char*, const char*);
-
-/*
** The body of the HTTP reply text is stored here.
*/
static int nAllocTxt = 0; /* Amount of space allocated for HTTP reply text */
@@ -669,17 +662,17 @@ static void process_multipart_form_data(char *z, int l
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 ){
+ if( c=='c' && strcasecmp(azArg[i],"content-disposition:")==0 ){
i++;
- }else if( c=='n' && stricmp(azArg[i],"name=")==0 ){
+ }else if( c=='n' && strcasecmp(azArg[i],"name=")==0 ){
zName = azArg[++i];
- }else if( c=='f' && stricmp(azArg[i],"filename=")==0 ){
+ }else if( c=='f' && strcasecmp(azArg[i],"filename=")==0 ){
char *z = azArg[++i];
if( zName && z ){
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' && strcasecmp(azArg[i],"content-type:")==0 ){
char *z = azArg[++i];
if( zName && z ){
cgi_set_parameter_nocopy(mprintf("%s:mimetype",zName), z);