[pkg-lighttpd] Bug#877039: ":80" is appended to socket file name

Stefan Bühler stbuehler at lighttpd.net
Sun Oct 1 10:50:15 UTC 2017


Hi Jonathan,

On 09/28/2017 01:23 AM, Jonathan Krebs wrote:
> Package: lighttpd
> Version: 1.4.45-1
> 
> If the server is bound to a socket in file system, three characters :80 are appended to the file path, breaking my reverse proxy setup.
> Minimal example:
> 
> jonny at heron:/var/tmp/ltest$ lighttpd -D -f config &
> [1] 30888
> jonny at heron:/var/tmp/ltest$ 2017-09-28 00:26:22: (log.c.217) server started 
> 
> jonny at heron:/var/tmp/ltest$ ls
> config  lighty.pid  lighty.sock:80
> 
> [...]
> 
> I think the source lines appending the port are src/network.c,
> buffer_copy_buffer(b, srv->srvconf.bindhost);
> buffer_append_string_len(b, CONST_STR_LEN(":"));
> buffer_append_int(b, srv->srvconf.port);

I think you are right about that - removing the buffer_append_* lines 
should fix it (and it shouldn't even break anything since 1.4.40).

> I remember my setup to work some time ago (jessie or something older)

I doubt that - these lines have been there for a long time (basically as 
far back as the svn history goes; svn revision 30 is the first we see in 
git).  $SERVER["socket"] should have been working fine though.

I think the upstream fix will be something like this (won't apply in 
1.4.45):

    https://git.lighttpd.net/lighttpd/lighttpd1.4.git/commit/src/network.c?h=personal/stbuehler/fix-server.bind-unix-path

cheers,
Stefan



More information about the pkg-lighttpd-maintainers mailing list