Browse Source

strip double / on path-info

git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@79 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/release-1.3.13
Jan Kneschke 17 years ago
parent
commit
b68e4a2f2c
  1. 10
      src/response.c

10
src/response.c

@ -917,7 +917,12 @@ handler_t http_response_prepare(server *srv, connection *con) {
}
/* not found, perhaps PATHINFO */
buffer_copy_string_buffer(srv->tmp_buf, con->physical.rel_path);
if (con->physical.rel_path->ptr[0] == '/') {
buffer_copy_string_len(srv->tmp_buf, con->physical.rel_path->ptr + 1, con->physical.rel_path->used - 2);
} else {
buffer_copy_string_buffer(srv->tmp_buf, con->physical.rel_path);
}
/*
*
@ -987,13 +992,12 @@ handler_t http_response_prepare(server *srv, connection *con) {
con->uri.path->used -= strlen(pathinfo);
con->uri.path->ptr[con->uri.path->used - 1] = '\0';
}
if (con->conf.log_request_handling) {
log_error_write(srv, __FILE__, __LINE__, "s", "-- after pathinfo check");
log_error_write(srv, __FILE__, __LINE__, "sb", "Path :", con->physical.path);
log_error_write(srv, __FILE__, __LINE__, "sb", "URI :", con->uri.path);
log_error_write(srv, __FILE__, __LINE__, "sb", "Pathinfo :", con->request.pathinfo);
}

Loading…
Cancel
Save