CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2021/04/29 12:23:07
Modified files:
usr.sbin/httpd : server_file.c
Log message:
Use relative reference URIs in Location header on directory redirects.
This adds support for front-ending httpd(8) with a TLS-terminating
gateway like relayd(8) that forwards unencrypted http traffic.
Previously httpd(8) would use a full URL in the Location header in 301
redirects when a user-agent requests a directory but without the
trailing '/'. If the user-agent originally connected with https, this
caused the redirected url to be http.
This change conforms to RFC7231 section 7.1.2.
Reported by Vincent Lee.
OK claudio@