Current code will segfault if we don't specify DOCUMENT_URI in nginx conf file.
Signed-off-by: Liu Yuan <[email protected]> --- sheep/http/http.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sheep/http/http.c b/sheep/http/http.c index aaaec18..fb7aac2 100644 --- a/sheep/http/http.c +++ b/sheep/http/http.c @@ -164,6 +164,9 @@ static int request_init_operation(struct http_request *req) return BAD_REQUEST; } req->uri = FCGX_GetParam("DOCUMENT_URI", env); + if (!req->uri) + return BAD_REQUEST; + req->status = UNKNOWN; return OK; -- 1.7.9.5 -- sheepdog mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/sheepdog
