Fix from upstream via Brad:
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/
This commit is contained in:
parent
484343e39c
commit
0ca01b0f74
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.67 2010/04/09 11:06:22 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.68 2010/04/18 08:24:31 sthen Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
COMMENT= secure, fast, compliant, and very flexible web-server
|
||||
|
||||
DISTNAME= lighttpd-1.4.26
|
||||
PKGNAME= ${DISTNAME}p0
|
||||
PKGNAME= ${DISTNAME}p1
|
||||
CATEGORIES= www net
|
||||
MASTER_SITES= http://download.lighttpd.net/lighttpd/releases-1.4.x/
|
||||
|
||||
|
30
www/lighttpd/patches/patch-src_response_c
Normal file
30
www/lighttpd/patches/patch-src_response_c
Normal file
@ -0,0 +1,30 @@
|
||||
$OpenBSD: patch-src_response_c,v 1.3 2010/04/18 08:24:31 sthen Exp $
|
||||
--- src/response.c.orig Sat Apr 17 21:03:28 2010
|
||||
+++ src/response.c Sat Apr 17 21:06:03 2010
|
||||
@@ -136,6 +136,8 @@ static void https_add_ssl_entries(connection *con) {
|
||||
X509 *xs;
|
||||
X509_NAME *xn;
|
||||
X509_NAME_ENTRY *xe;
|
||||
+ int i, nentries;
|
||||
+
|
||||
if (
|
||||
SSL_get_verify_result(con->ssl) != X509_V_OK
|
||||
|| !(xs = SSL_get_peer_certificate(con->ssl))
|
||||
@@ -144,7 +146,7 @@ static void https_add_ssl_entries(connection *con) {
|
||||
}
|
||||
|
||||
xn = X509_get_subject_name(xs);
|
||||
- for (int i = 0, nentries = X509_NAME_entry_count(xn); i < nentries; ++i) {
|
||||
+ for (i = 0, nentries = X509_NAME_entry_count(xn); i < nentries; ++i) {
|
||||
int xobjnid;
|
||||
const char * xobjsn;
|
||||
data_string *envds;
|
||||
@@ -581,7 +583,7 @@ handler_t http_response_prepare(server *srv, connectio
|
||||
};
|
||||
#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
Block a user