}
/* check version */
- if( strcmp(version, "HTTP/0.9") && strcmp(version, "HTTP/1.0") && strcmp(version, "HTTP/1.1") )
+ if( (version == NULL) || (strcmp(version, "HTTP/0.9") &&
+ strcmp(version, "HTTP/1.0") && strcmp(version, "HTTP/1.1")) )
{
/* unsupported version */
uh_http_response(cl, 400, "Bad Request");
}
}
- /* 400 */
- else
- {
- uh_http_sendhf(cl, 400, "Bad Request",
- "Malformed request received");
- }
-
#ifdef HAVE_TLS
/* free client tls context */
if( conf.tls )