diff options
author | https://www.google.com/accounts/o8/id?id=AItOawlqWSY9PNYRysA9vrU-JiQh7-s7q6SOcIE <Fergus@web> | 2011-11-23 19:23:57 -0400 |
---|---|---|
committer | admin <admin@branchable.com> | 2011-11-23 19:23:57 -0400 |
commit | 65acd8f71c104384ca3c604d4b3efd8ace5624ab (patch) | |
tree | 7fbd8d212b55eef33525bc46aee842ace6172518 /doc/bugs | |
parent | 0ee337113e722c9fd6ef46dda5819a607ec1a9b6 (diff) | |
download | ikiwiki-65acd8f71c104384ca3c604d4b3efd8ace5624ab.tar ikiwiki-65acd8f71c104384ca3c604d4b3efd8ace5624ab.tar.gz |
Patch for 'thttpd' should anyone else find this problem in archives.
Diffstat (limited to 'doc/bugs')
-rw-r--r-- | doc/bugs/Running_on_an_alternative_port_fails.mdwn | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/bugs/Running_on_an_alternative_port_fails.mdwn b/doc/bugs/Running_on_an_alternative_port_fails.mdwn index 864c99fed..8bc0f90af 100644 --- a/doc/bugs/Running_on_an_alternative_port_fails.mdwn +++ b/doc/bugs/Running_on_an_alternative_port_fails.mdwn @@ -55,3 +55,26 @@ right. number from the `Host:` header. That can be fixed. >>>>> Thanks for the assist. -- fergus + +--- + +Patch for `thttpd-2.25b` for posterity and completeness + +[[!format patch """ + +diff --git a/libhttpd.c b/libhttpd.c +index 73689be..039b7e3 100644 +--- a/libhttpd.c ++++ b/libhttpd.c +@@ -2074,9 +2074,6 @@ httpd_parse_request( httpd_conn* hc ) + cp = &buf[5]; + cp += strspn( cp, " \t" ); + hc->hdrhost = cp; +- cp = strchr( hc->hdrhost, ':' ); +- if ( cp != (char*) 0 ) +- *cp = '\0'; + if ( strchr( hc->hdrhost, '/' ) != (char*) 0 || hc->hdrhost[0] == '.' ) + { + httpd_send_err( hc, 400, httpd_err400title, "", httpd_err400form, "" ); + +"""]] |