Fix accesslog port (should be port from the connection, not the "server.port") (#1618)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2149 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
Stefan Bühler 2008-04-23 13:04:21 +00:00
parent 0841482318
commit 79a6ae3fd4
2 changed files with 9 additions and 1 deletions

1
NEWS
View File

@ -15,6 +15,7 @@ NEWS
* Don't send empty Server headers (#1620)
* Fix conditional interpretation of core options
* Enable escaping of % and $ in redirect/rewrite; only two cases changed their behaviour: "%%" => "%", "$$" => "$"
* Fix accesslog port (should be port from the connection, not the "server.port") (#1618)
- 1.4.19 - 2008-03-10

View File

@ -806,7 +806,14 @@ REQUESTDONE_FUNC(log_access_write) {
buffer_append_string(b, "%");
break;
case FORMAT_SERVER_PORT:
buffer_append_long(b, srv->srvconf.port);
{
char *colon = strchr(((server_socket*)(con->srv_socket))->srv_token->ptr, ':');
if (colon) {
buffer_append_string(b, colon+1);
} else {
buffer_append_long(b, srv->srvconf.port);
}
}
break;
case FORMAT_QUERY_STRING:
buffer_append_string_buffer(b, con->uri.query);