Browse Source

- fix also scgi and proxy modules. #1489

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2035 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.19
Elan Ruusamäe 14 years ago
parent
commit
513057ebd4
  1. 4
      NEWS
  2. 14
      src/mod_proxy.c
  3. 5
      src/mod_scgi.c

4
NEWS

@ -10,8 +10,8 @@ NEWS
* fixed initgroups() called after chroot (#1384)
* fixed case-sensitive check for Auth-Method (#1456)
* execute fcgi app without /bin/sh if used as argument to spawn-fcgi (#1428)
* fixed a bug that made /-prefixed fcgi extensions being handled also when
matching the end of the uri (#1489)
* fixed a bug that made /-prefixed extensions being handled also when
matching the end of the uri in fcgi,scgi and proxy modules (#1489)
* Print error if X-LIGHTTPD-send-file cannot be done; reset header
Content-Length for send-file. Patches by Stefan Bühler

14
src/mod_proxy.c

@ -1093,15 +1093,17 @@ static handler_t mod_proxy_check_extension(server *srv, connection *con, void *p
if (s_len < ct_len) continue;
/* check extension in the form "/proxy_pattern" */
if (*(extension->key->ptr) == '/' && strncmp(fn->ptr, extension->key->ptr, ct_len) == 0) {
if (s_len > ct_len + 1) {
char *pi_offset;
if (*(extension->key->ptr) == '/') {
if (strncmp(fn->ptr, extension->key->ptr, ct_len) == 0) {
if (s_len > ct_len + 1) {
char *pi_offset;
if (0 != (pi_offset = strchr(fn->ptr + ct_len + 1, '/'))) {
path_info_offset = pi_offset - fn->ptr;
if (0 != (pi_offset = strchr(fn->ptr + ct_len + 1, '/'))) {
path_info_offset = pi_offset - fn->ptr;
}
}
break;
}
break;
} else if (0 == strncmp(fn->ptr + s_len - ct_len, extension->key->ptr, ct_len)) {
/* check extension in the form ".fcg" */
break;

5
src/mod_scgi.c

@ -2694,8 +2694,9 @@ static handler_t scgi_check_extension(server *srv, connection *con, void *p_d, i
if (s_len < ct_len) continue;
/* check extension in the form "/scgi_pattern" */
if (*(extension->key->ptr) == '/' && strncmp(fn->ptr, extension->key->ptr, ct_len) == 0) {
break;
if (*(extension->key->ptr) == '/') {
if (strncmp(fn->ptr, extension->key->ptr, ct_len) == 0)
break;
} else if (0 == strncmp(fn->ptr + s_len - ct_len, extension->key->ptr, ct_len)) {
/* check extension in the form ".fcg" */
break;

Loading…
Cancel
Save