Bug #1881
closedmax_keep_alive_requests could not depend on URI
Description
In lighttpd upto and including 1.4.20 the following would not work as intended:
$HTTP["host"] == "update.example.com" { $HTTP["url"] =~ "\.chk$" { # close keep-alive connection after *.chk # The order of requests is *.ver, *.chk # client will not issue any more requests. server.max-keep-alive-requests = 0 } }
The attached patch makes it possible for server.max-keep-alice-requests
to depend on $HTTP["url"]
by moving the test if (con->request_count > con->conf.max_keep_alive_requests)
after the last call to config_patch_connection()
.
Files
Updated by icy almost 16 years ago
- Target version changed from 1.4.20 to 1.4.21
- % Done changed from 100 to 0
- Patch available changed from Yes to No
Hm there is no patch attached. Maybe you forgot that? :)
Updated by roques almost 16 years ago
- File URI_conditinal-max_keep_alive_requests.patch URI_conditinal-max_keep_alive_requests.patch added
This is really strange. I'm sure I [Browse...]ed for the patch.
But, obviously something went amiss.
Let's see if I'm able to attach the patch this time :-)
Updated by icy almost 16 years ago
- Target version changed from 1.4.21 to 1.4.22
- Patch available changed from No to Yes
Updated by stbuehler almost 16 years ago
- Status changed from New to Need Feedback
- Patch available changed from Yes to No
The patch doesn't convince me; if the raw_url handler triggers, your patch skips the server.max-keep-alive-requests handling.
Perhaps we could check it again after the url conditional matching; in that case you could drop the value in an url conditional (i do not want to reactivate keep-alive after it got disabled)
Updated by roques almost 16 years ago
- File URI_conditinal-max_keep_alive_requests2.patch URI_conditinal-max_keep_alive_requests2.patch added
Moving the test down to the last possible moment should be another solution. (see attached patch)
In trunk the test has been moved into http_response_write_header()
which should be OK.
I grepped for read-accesses to con->keep_alive
and could not find any between the current location of the test and http_response_write_header()
.
Updated by stbuehler almost 16 years ago
- Target version changed from 1.4.22 to 1.4.23
Updated by roques almost 16 years ago
- Status changed from Need Feedback to Patch Pending
- % Done changed from 0 to 70
The (revised on 2009-02-06) patch still applies cleanly to what is currently in subversion lighttpd-1.4.x/
Are there any problems or reserves against this solution?
Updated by stbuehler over 15 years ago
- Status changed from Patch Pending to Fixed
- % Done changed from 70 to 100
Applied in changeset r2534.
Also available in: Atom