projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
volume_id: Adopt to new kbuild style.
[oweals/busybox.git]
/
networking
/
httpd.c
diff --git
a/networking/httpd.c
b/networking/httpd.c
index 12218a0a32246bfe9c11547b8e859657d8ac4b6c..cef9b8baf8de4c8e3717f2b60497308542b8cd47 100644
(file)
--- a/
networking/httpd.c
+++ b/
networking/httpd.c
@@
-796,9
+796,9
@@
static void parse_conf(const char *path, int flag)
/* the line is not recognized */
config_error:
bb_error_msg("config error '%s' in '%s'", buf, filename);
/* the line is not recognized */
config_error:
bb_error_msg("config error '%s' in '%s'", buf, filename);
-
} /* while (fgets) */
+ } /* while (fgets) */
-
fclose(f);
+ fclose(f);
}
#if ENABLE_FEATURE_HTTPD_ENCODE_URL_STR
}
#if ENABLE_FEATURE_HTTPD_ENCODE_URL_STR
@@
-1414,7
+1414,7
@@
static void send_cgi_and_exit(
if (script != url) { /* paranoia */
*script = '\0';
if (chdir(url + 1) != 0) {
if (script != url) { /* paranoia */
*script = '\0';
if (chdir(url + 1) != 0) {
- bb_perror_msg("c
hdir(%s)
", url + 1);
+ bb_perror_msg("c
an't change directory to '%s'
", url + 1);
goto error_execing_cgi;
}
// not needed: *script = '/';
goto error_execing_cgi;
}
// not needed: *script = '/';
@@
-1708,9
+1708,9
@@
static int pam_talker(int num_msg,
case PAM_PROMPT_ECHO_OFF:
s = userinfo->pw;
break;
case PAM_PROMPT_ECHO_OFF:
s = userinfo->pw;
break;
- case PAM_ERROR_MSG:
- case PAM_TEXT_INFO:
- s = "";
+ case PAM_ERROR_MSG:
+ case PAM_TEXT_INFO:
+ s = "";
break;
default:
free(response);
break;
default:
free(response);
@@
-1964,7
+1964,9
@@
static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr)
send_headers_and_exit(HTTP_BAD_REQUEST);
/* Determine type of request (GET/POST) */
send_headers_and_exit(HTTP_BAD_REQUEST);
/* Determine type of request (GET/POST) */
- urlp = strpbrk(iobuf, " \t");
+ // rfc2616: method and URI is separated by exactly one space
+ //urlp = strpbrk(iobuf, " \t"); - no, tab isn't allowed
+ urlp = strchr(iobuf, ' ');
if (urlp == NULL)
send_headers_and_exit(HTTP_BAD_REQUEST);
*urlp++ = '\0';
if (urlp == NULL)
send_headers_and_exit(HTTP_BAD_REQUEST);
*urlp++ = '\0';
@@
-1982,7
+1984,8
@@
static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr)
if (strcasecmp(iobuf, request_GET) != 0)
send_headers_and_exit(HTTP_NOT_IMPLEMENTED);
#endif
if (strcasecmp(iobuf, request_GET) != 0)
send_headers_and_exit(HTTP_NOT_IMPLEMENTED);
#endif
- urlp = skip_whitespace(urlp);
+ // rfc2616: method and URI is separated by exactly one space
+ //urlp = skip_whitespace(urlp); - should not be necessary
if (urlp[0] != '/')
send_headers_and_exit(HTTP_BAD_REQUEST);
if (urlp[0] != '/')
send_headers_and_exit(HTTP_BAD_REQUEST);