fixed PATH_INFO usage in embedded http mode

This commit is contained in:
Roberto De Ioris
2012-10-20 20:58:19 +02:00
parent 8dc072732b
commit 59cc3d7c04
2 changed files with 4 additions and 1 deletions
-1
View File
@@ -1024,7 +1024,6 @@ next:
}
}
// check for static files
// skip extensions
+4
View File
@@ -137,6 +137,8 @@ static int http_parse(struct wsgi_request *wsgi_req, char *watermark) {
wsgi_req->path_info_len = ptr - base;
http_url_decode(base, &wsgi_req->path_info_len, wsgi_req->path_info);
wsgi_req->uh.pktsize += proto_base_add_uwsgi_var(wsgi_req, "PATH_INFO", 9, wsgi_req->path_info, wsgi_req->path_info_len);
wsgi_req->path_info = (wsgi_req->buffer + wsgi_req->uh.pktsize) - (ptr - base);
wsgi_req->path_info_len = ptr - base;
}
else {
uwsgi_log("not enough space in wsgi_req http proto_parser_buf to encode PATH_INFO, consider tuning it with --buffer-size\n");
@@ -158,6 +160,8 @@ static int http_parse(struct wsgi_request *wsgi_req, char *watermark) {
wsgi_req->path_info_len = ptr - base;
http_url_decode(base, &wsgi_req->path_info_len, wsgi_req->path_info);
wsgi_req->uh.pktsize += proto_base_add_uwsgi_var(wsgi_req, "PATH_INFO", 9, wsgi_req->path_info, wsgi_req->path_info_len);
wsgi_req->path_info = (wsgi_req->buffer + wsgi_req->uh.pktsize) - (ptr - base);
wsgi_req->path_info_len = ptr - base;
}
else {
uwsgi_log("not enough space in wsgi_req http proto_parser_buf to encode PATH_INFO, consider tuning it with --buffer-size\n");