On Tue, Jan 10, 2017 at 11:00 PM, Bryan Talbot <[email protected]> wrote: > Whatever the reason for forcing the connection closed -- it only closes when > the scheme changes. Redirecting to a different host or port when using a > “scheme less” URI allows the connection to be kept open. > > > listen http > bind :8000 > http-request redirect location //127.0.0.2:8001/redir > > [...] > > > Maybe that will be useful to Ciprian to make the redirect to a new hostname > but keep the connection to the old host open if that’s what is needed.
Thanks for the suggestion, however there are two issues with this proposal: (A) I'm not sure how would browsers in general behave when faced with a schema-less URL in the `Location` header. A quick survey of the internet (i.e. the top search on Google points to a StackOverflow question) suggests that browsers would handle these "protocol-relative" URL's just fine when loading assets; however the HTTP standard seems to mandate "absolute" URL's with regard of the `Location` header: https://tools.ietf.org/html/rfc2616#section-14.30 (B) Moreover in my particular case it still doesn't fully solve the issue, mainly because the organization I'm working for is migrating quite a handful of sites and is applying two major changes: moving to TLS (via LetsEncrypt issued certificates) and making sure all sites follow the policy of `www`-less prefix. Thus the majority of our redirects are of the form `https://subdomain.domain.com`. Thanks, Ciprian.

