summaryrefslogtreecommitdiff
path: root/src/request.c
diff options
context:
space:
mode:
authorJan Kneschke <jan@kneschke.de>2005-07-09 20:17:40 +0000
committerJan Kneschke <jan@kneschke.de>2005-07-09 20:17:40 +0000
commite6c1e139e2ca4969907eb2654f8488f879eb46b7 (patch)
tree5915b64eab87388ba872dcef5d4a04a0c324288d /src/request.c
parenta03091d79e8dad7882e6b351971d653a5c61751a (diff)
downloadlighttpd-git-e6c1e139e2ca4969907eb2654f8488f879eb46b7.tar.gz
ah, don't care about the valid chars, control-chars, 127 and 255 are out
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@433 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/request.c')
-rw-r--r--src/request.c49
1 files changed, 5 insertions, 44 deletions
diff --git a/src/request.c b/src/request.c
index c3c86c6a..df5da536 100644
--- a/src/request.c
+++ b/src/request.c
@@ -259,51 +259,12 @@ int http_request_split_value(array *vals, buffer *b) {
return 0;
}
-int request_uri_is_valid_char(char c) {
- /* RFC 2396 - Appendix A */
+int request_uri_is_valid_char(unsigned char c) {
+ if (c <= 32) return 0;
+ if (c == 127) return 0;
+ if (c == 255) return 0;
- /* alphanum */
- if (light_isalnum(c)) return 1;
- if (c < 0) return 1; /* no-ascii chars are ok */
-
- switch(c) {
- /* reserved */
- case ';':
- case '/':
- case '?':
- case ':':
- case '@':
- case '&':
- case '=':
- case '+': /* only in Query part it is rewritten to ' ' (space) */
- case '$':
- case ',':
-
- /* mark */
- case '-':
- case '_':
- case '.':
- case '!':
- case '~':
- case '*':
- case '\'':
- case '(':
- case ')':
-
- /* escaped */
- case '%':
-
- /* fragment, should not be out in the wild $*/
- case '#':
-
- /* non RFC */
- case '[':
- case ']':
- case '|':
- return 1;
- }
-
- return 0;
+ return 1;
}
int http_request_parse(server *srv, connection *con) {