Project

General

Profile

Actions

Bug #2661

closed

redirect to directory should url-encode uri.path

Added by gstrauss over 9 years ago. Updated over 9 years ago.

Status:
Fixed
Priority:
Normal
Category:
-
Target version:
ASK QUESTIONS IN Forums:

Description

http_response_redirect_to_directory() in src/http-header-glue.c should url-encode con->uri.path when constructing Location response header, i.e. replace

buffer_append_string_buffer(o, con->uri.path);

with

buffer_append_string_encoded(o, CONST_BUF_LEN(con->uri.path), ENCODING_REL_URI);

See http://redmine.lighttpd.net/issues/1827 where mod_redirect and mod_rewrite were modified (subversion r2362) to use con->request.uri instead of con->uri.path and con->uri.query. If using con->request.uri is preferred over url-encoding con->uri.path, then '/' would need to be added after path and before query string (if present). However, using con->request.uri would mean that the original URI would have '/' appended, and any rewrite rules which subsequently modified con->uri.path would be ignored.

This is an issue in lighttpd 1.5, too.

#2

Updated by stbuehler over 9 years ago

  • Target version changed from 1.4.37 to 1.4.38
#3

Updated by stbuehler over 9 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100
Actions

Also available in: Atom