Permalink
Browse files

Fixes the generation of pathinfo.

Under some circumstances the conn->request is already stripped from the conn->webdirectory, and actually removes a legitimate part of the filename. Malforming the pathinfo.
  • Loading branch information...
1 parent 8f51b15 commit 4bcf1085c7b83012bc7a9671137e4227a571e2ab @skinkie skinkie committed Feb 10, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 cherokee/handler_cgi_base.c
@@ -381,7 +381,7 @@ cherokee_handler_cgi_base_build_basic_env (
}
/* HTTP_HOST and SERVER_NAME. The difference between them is that
- * HTTP_HOST can include the «:PORT» text, and SERVER_NAME only
+ * HTTP_HOST can include the :PORT text, and SERVER_NAME only
* the name
*/
cherokee_header_copy_known (&conn->header, header_host, tmp);
@@ -885,7 +885,7 @@ cherokee_handler_cgi_base_extract_path (cherokee_handler_cgi_base_t *cgi,
*/
if (! props->check_file)
{
- if (conn->web_directory.len == 1) {
+ if (conn->web_directory.len == 1 || cherokee_connection_use_webdir (conn)) {
cherokee_buffer_add_buffer (&conn->pathinfo, &conn->request);
} else {

0 comments on commit 4bcf108

Please sign in to comment.