comparison src/c/cgi.c @ 1154:b0d632cc9edf

More fixes for NetBSD support
author Adam Chlipala <adamc@hcoop.net>
date Sat, 06 Feb 2010 20:47:23 -0500
parents b08b73591d2c
children 236dc296c32d
comparison
equal deleted inserted replaced
1153:a62ac791f7fb 1154:b0d632cc9edf
23 uppercased = realloc(uppercased, len + 6); 23 uppercased = realloc(uppercased, len + 6);
24 } 24 }
25 25
26 strcpy(uppercased, "HTTP_"); 26 strcpy(uppercased, "HTTP_");
27 for (s = uppercased+5; *h; ++h) 27 for (s = uppercased+5; *h; ++h)
28 *s++ = *h == '-' ? '_' : toupper(*h); 28 *s++ = *h == '-' ? '_' : toupper((int)*h);
29 *s = 0; 29 *s = 0;
30 30
31 if ((r = getenv(uppercased))) 31 if ((r = getenv(uppercased)))
32 return r; 32 return r;
33 else if (!strcasecmp(saved_h, "Content-length") 33 else if (!strcasecmp(saved_h, "Content-length")