From 23be5c4d55d0bf028619064e8d5700dd1af6e1a3 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Fri, 5 Dec 2008 20:34:24 +0000 Subject: Let's give a damn about syntactical correctness of peer's http strings. It's too expensive on both sides to check and to reject. --- ot_http.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'ot_http.c') diff --git a/ot_http.c b/ot_http.c index ee76639..b86ffb8 100644 --- a/ot_http.c +++ b/ot_http.c @@ -504,10 +504,6 @@ ssize_t http_handle_request( const int64 client_socket, char *data, size_t recv_ /* This one implicitely tests strlen < 5, too -- remember, it is \n terminated */ if( byte_diff( data, 5, "GET /") ) HTTPERROR_400; - /* Query string MUST terminate with SP -- we know that theres at least a '\n' where this search terminates */ - for( c = data + 5; *c!=' ' && *c != '\t' && *c != '\n' && *c != '\r'; ++c ) ; - if( *c != ' ' ) HTTPERROR_400; - /* Skip leading '/' */ for( c = data+4; *c == '/'; ++c); -- cgit v1.2.3