diff -urN thttpd-2.21-20/libhttpd.c thttpd-2.21-21/libhttpd.c --- thttpd-2.21-20/libhttpd.c Tue Feb 26 17:48:13 2002 +++ thttpd-2.21-21/libhttpd.c Wed Mar 20 17:12:32 2002 @@ -4073,6 +4073,9 @@ char* cp3; static char* refhost = (char*) 0; static int refhost_size = 0; + static char* tmphost; + static int tmphostsize =0 ; + int i; char *lp; hs = hc->hs; @@ -4131,7 +4134,17 @@ /* If the referer host doesn't match the local host pattern, and ** the URL does match the url pattern, it's an illegal reference. */ - if ( ! match( lp, refhost ) && match( hs->url_pattern, hc->decodedurl ) ) + /* + XXX bad! + i have to write one function tolower myself... + */ + httpd_realloc_str(&tmphost,&tmphostsize,strlen(hc->decodedurl)+2); + strcpy(tmphost,hc->decodedurl); + for (i=0;tmphost[i]!=0;i++) + { + if ( (tmphost[i]>64) && (tmphost[i]<91)) tmphost[i]+=32; + } + if ( ! match( lp, refhost ) && match( hs->url_pattern, tmphost ) ) return 0; /* Otherwise ok. */ return 1;