Project

General

Profile

Actions

Bug #1877

closed

lighttpd fails to respond with proxy backend with Proxy-Connection: header

Added by glen almost 16 years ago. Updated almost 16 years ago.

Status:
Fixed
Priority:
Normal
Category:
mod_proxy
Target version:
ASK QUESTIONS IN Forums:

Description

i have such setup (lighttpd->squid->lighttpd)

1. lighttpd on public.ip:80 with config:

$HTTP["host"] == "somehost" {
  proxy.server = ("" => (( "host" => "proxy.ip", "port" => "80" )))
}

2. squid listening on proxy.ip:80
squid is sending all requests to backend.ip:80

3. lighttpd listening on backend.ip:80

when i send request to public.ip:80 with following headers:

GET http://some.name/ HTTP/1.1
Host: some.name
Proxy-Connection: keep-alive

then first lighttpd never answers the response:

nc -vv public.ip 80 < rp.txt
ado2.delfi.ee [public.ip] 80 (ndl-aas) open

however if i remove squid from middle, it works okay.

so i guess the problem is that Proxy-Connection: header SHOULD NOT SENT TO BACKEND unless lighty is really handling it


Files

lighttpd-bug-1877.patch (477 Bytes) lighttpd-bug-1877.patch glen, 2009-01-16 17:12
Actions #1

Updated by glen almost 16 years ago

enabling proxy.debug = 1 :

2009-01-16 18:56:00: (mod_proxy.c.1087) proxy - start
2009-01-16 18:56:00: (mod_proxy.c.1125) proxy - ext found
2009-01-16 18:56:00: (mod_proxy.c.1259) proxy - found a host proxy.ip 80
2009-01-16 18:56:00: (mod_proxy.c.377) connect delayed: 9
2009-01-16 18:56:00: (mod_proxy.c.999) proxy: fdevent-out 1
2009-01-16 18:56:00: (mod_proxy.c.810) proxy - connect - delayed success
2009-01-16 18:56:00: (mod_proxy.c.966) proxy: fdevent-in 4
2009-01-16 18:56:00: (mod_proxy.c.650) proxy - have to read: 407

Actions #2

Updated by glen almost 16 years ago

  • Patch available changed from No to Yes
Actions #3

Updated by glen almost 16 years ago

here's my patch, it solves the problem, however i'm not sure is it accurate to do so

Actions #4

Updated by stbuehler almost 16 years ago

Not a bug in lighttpd imho.

http://homepages.tesco.net/J.deBoynePollard/FGA/web-proxy-connection-header.html

Perhaps we should filter that stupid header anyway, but i don't like it.

Actions #5

Updated by glen almost 16 years ago

after reading that doc, i'd say we do right thing dropping it, as "connection persistence is, by its very nature, a single-hop concept.", and if lighty at some point supports persistent connections to backend http servers, it should add and handle it by itself.

Actions #6

Updated by glen almost 16 years ago

tested with 1.5 (r2371) and the problem doesn't occour in 1.5 code.

Actions #7

Updated by glen almost 16 years ago

  • Assignee set to glen
  • % Done changed from 0 to 100

applied in r2372 for 1.4

Actions #8

Updated by glen almost 16 years ago

  • Target version set to 1.4.21
Actions #9

Updated by glen almost 16 years ago

  • Status changed from New to Fixed
Actions

Also available in: Atom