Changeset 47162


Ignore:
Timestamp:
2015-10-08T00:20:55+02:00 (2 years ago)
Author:
jow
Message:

CC: uhttpd: fix keep-alive bug (#20607, #20661)

The two commits

5162e3b0ee7bd1d0fd6e75e1ca7993a1834b5291

"allow request handlers to disable chunked reponses"

and

618493e378e2239f0d30902e47adfa134e649fdc

"file: disable chunked encoding for file responses"

broke the chunked transfer encoding handling for proc responses in keep-alive
connections that followed a file response with http status 204 or 304.

The effect of this bug is that cgi responses following a 204 or 304 one where
sent neither in chunked encoding nor with a content-length header, causing
browsers to stall until the keep alive timeout was reached.

Fix the logic flaw by inverting the chunk prevention flag in the client state
and by testing the chunked encoding preconditions every time instead of
once upon client (re-)initialization.

Signed-off-by: Jo-Philipp Wich <jow@…>

Backport of r47161

Location:
branches/chaos_calmer/package/network/services/uhttpd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/chaos_calmer/package/network/services/uhttpd/Makefile

    r46808 r47162  
    99 
    1010PKG_NAME:=uhttpd 
    11 PKG_VERSION:=2015-09-07 
     11PKG_VERSION:=2015-10-08 
    1212PKG_RELEASE=$(PKG_SOURCE_VERSION) 
    1313 
     
    1515PKG_SOURCE_URL:=git://nbd.name/uhttpd2.git 
    1616PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) 
    17 PKG_SOURCE_VERSION:=993cace15114a0f06f720f34a4748ab54b695f0d 
     17PKG_SOURCE_VERSION:=7ed2edc40dd6d0171266f3bfbc96466e1d25e3cd 
    1818PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz 
    1919PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org> 
  • branches/chaos_calmer/package/network/services/uhttpd/files/uhttpd.init

    r45852 r47162  
    132132 
    133133        procd_close_instance 
    134  
    135         # Check if daemon is running, if not then 
    136         # re-execute in foreground to display error. 
    137 #       sleep 1 && service_check $UHTTPD_BIN || \ 
    138 #               $UHTTPD_BIN -f $UHTTPD_ARGS 
    139134} 
    140135 
Note: See TracChangeset for help on using the changeset viewer.