Browse Source

[core] accept up to 5 digit port num in host cond

(thx zebul66)

accept up to 5 digit port num in $HTTP["host"] condition match

x-ref:
  "Alls page and subdomain returns 404 with 1.4.60"
  https://redmine.lighttpd.net/boards/2/topics/10074
master
Glenn Strauss 2 months ago
parent
commit
44b47fc271
  1. 2
      src/configfile-glue.c

2
src/configfile-glue.c

@ -521,7 +521,7 @@ static cond_result_t config_check_cond_nocache(request_st * const r, const data_
/*(r->uri.authority lowercased during request parsing)*/
if (llen && llen != dlen) {
match ^= ((llen > dlen)
? l->ptr[dlen] == ':' && llen - dlen <= 5
? l->ptr[dlen] == ':' && llen - dlen <= 6
: dc->string.ptr[(dlen = llen)] == ':')
&& 0 == memcmp(l->ptr, dc->string.ptr, dlen);
break;

Loading…
Cancel
Save