Check uri instead of physical path for directory redirect
* should fix alias handling for "/foo" => "/var/www/"; http://example.com/foo should result in a redirect to http://example.com/foo/ git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2720 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
parent
221af3d59d
commit
a48aa0f023
1
NEWS
1
NEWS
|
@ -7,6 +7,7 @@ NEWS
|
|||
* Fix handling return value of SSL_CTX_set_options (fixes #2157, thx mlcreech)
|
||||
* Fix mod_proxy HUP handling (send final chunk, fix usage counter)
|
||||
* mod_proxy: close connection on write error (fixes #2114)
|
||||
* Check uri instead of physical path for directory redirect
|
||||
|
||||
- 1.4.26 - 2010-02-07
|
||||
* Fix request parser to handle packets with splitted \r\n\r\n (fixes #2105)
|
||||
|
|
|
@ -581,7 +581,7 @@ handler_t http_response_prepare(server *srv, connection *con) {
|
|||
};
|
||||
#endif
|
||||
if (S_ISDIR(sce->st.st_mode)) {
|
||||
if (con->physical.path->ptr[con->physical.path->used - 2] != '/') {
|
||||
if (con->uri.path->ptr[con->uri.path->used - 2] != '/') {
|
||||
/* redirect to .../ */
|
||||
|
||||
http_response_redirect_to_directory(srv, con);
|
||||
|
|
Loading…
Reference in New Issue