svn commit: trunk/busybox/networking
vodz at busybox.net
vodz at busybox.net
Tue Jan 24 12:02:31 UTC 2006
Author: vodz
Date: 2006-01-24 04:02:27 -0800 (Tue, 24 Jan 2006)
New Revision: 13550
Log:
close bug 657
Modified:
trunk/busybox/networking/httpd.c
Changeset:
Modified: trunk/busybox/networking/httpd.c
===================================================================
--- trunk/busybox/networking/httpd.c 2006-01-24 10:38:51 UTC (rev 13549)
+++ trunk/busybox/networking/httpd.c 2006-01-24 12:02:27 UTC (rev 13550)
@@ -1615,13 +1615,6 @@
*purl = ' ';
count = sscanf(purl, " %[^ ] HTTP/%d.%*d", buf, &blank);
- test = decodeString(buf, 0);
- if(test == NULL)
- goto BAD_REQUEST;
- if(test == (buf+1)) {
- sendHeaders(HTTP_NOT_FOUND);
- break;
- }
if (count < 1 || buf[0] != '/') {
/* Garbled request/URL */
goto BAD_REQUEST;
@@ -1639,6 +1632,13 @@
config->query = test;
}
+ test = decodeString(url, 0);
+ if(test == NULL)
+ goto BAD_REQUEST;
+ if(test == (buf+1)) {
+ sendHeaders(HTTP_NOT_FOUND);
+ break;
+ }
/* algorithm stolen from libbb bb_simplify_path(),
but don`t strdup and reducing trailing slash and protect out root */
purl = test = url;
More information about the busybox-cvs
mailing list