Browse Source

fix segfault in log_error_write if host is empty

git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@38 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/release-1.3.12
Jan Kneschke 17 years ago
parent
commit
44997909b1
  1. 5
      src/request.c

5
src/request.c

@ -863,8 +863,9 @@ int http_request_parse(server *srv, connection *con) {
}
}
/* check hostname field */
if (0 != request_check_hostname(srv, con, con->request.http_host)) {
/* check hostname field if it is set */
if (NULL != con->request.http_host &&
0 != request_check_hostname(srv, con, con->request.http_host)) {
log_error_write(srv, __FILE__, __LINE__, "sbs",
"Invalid Hostname:", con->request.http_host, "-> 400");

Loading…
Cancel
Save