Changeset 32027


Ignore:
Timestamp:
2012-06-02T16:56:24+02:00 (6 years ago)
Author:
jow
Message:

[package] uhttpd: add explicit stdin eof notification for Lua and CGI childs

Location:
trunk/package/uhttpd
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/uhttpd/Makefile

    r32005 r32027  
    99 
    1010PKG_NAME:=uhttpd 
    11 PKG_RELEASE:=34 
     11PKG_RELEASE:=35 
    1212 
    1313PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) 
  • trunk/package/uhttpd/src/uhttpd-cgi.c

    r31931 r32027  
    182182                len = uh_raw_send(state->wfd, buf, len, 
    183183                                                  cl->server->conf->script_timeout); 
     184 
     185                /* explicit EOF notification for the child */ 
     186                if (state->content_length <= 0) 
     187                        close(state->wfd); 
    184188        } 
    185189 
  • trunk/package/uhttpd/src/uhttpd-lua.c

    r31931 r32027  
    299299                        state->content_length = 0; 
    300300 
    301                 /* ... write to CGI process */ 
     301                /* ... write to Lua process */ 
    302302                len = uh_raw_send(state->wfd, buf, len, 
    303303                                                  cl->server->conf->script_timeout); 
     304 
     305                /* explicit EOF notification for the child */ 
     306                if (state->content_length <= 0) 
     307                        close(state->wfd); 
    304308        } 
    305309 
Note: See TracChangeset for help on using the changeset viewer.