Changeset 2149

Show
Ignore:
Timestamp:
04/23/2008 01:04:21 PM (4 months ago)
Author:
stbuehler
Message:

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

Location:
branches/lighttpd-1.4.x
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/lighttpd-1.4.x/NEWS

    r2148 r2149  
    1616  * Fix conditional interpretation of core options 
    1717  * Enable escaping of % and $ in redirect/rewrite; only two cases changed their behaviour: "%%" => "%", "$$" => "$" 
     18  * Fix accesslog port (should be port from the connection, not the "server.port") (#1618) 
    1819 
    1920- 1.4.19 - 2008-03-10 
  • branches/lighttpd-1.4.x/src/mod_accesslog.c

    r1872 r2149  
    807807                                break; 
    808808                        case FORMAT_SERVER_PORT: 
    809                                 buffer_append_long(b, srv->srvconf.port); 
     809                                { 
     810                                        char *colon = strchr(((server_socket*)(con->srv_socket))->srv_token->ptr, ':'); 
     811                                        if (colon) { 
     812                                                buffer_append_string(b, colon+1); 
     813                                        } else { 
     814                                                buffer_append_long(b, srv->srvconf.port); 
     815                                        } 
     816                                } 
    810817                                break; 
    811818                        case FORMAT_QUERY_STRING: