2

So I've got some warnings from Fiddler that I have bad urls in HTTP Location header and they are should be fully-qualified. Why it's so important and what issues that can lead to?

Kovpaev Alexey
  • 1,725
  • 6
  • 19
  • 38
  • The formal definition for a location header simply defines the payload to be an absolute URL. So using something relative violates the protocol definition: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html That does not mean that things must break for relative targets, but you have absolutely no guarantee that a client reacts the way you expect. – arkascha May 24 '16 at 11:55
  • @arkascha you are referring to an outdated spec – Julian Reschke May 24 '16 at 12:51

1 Answers1

5

The old standard for HTTP/1.1 (RFC 2616 § 14.30) required that Location be an absolute URI.

Implementation experience showed that this was not important, and many implementations allowed relative URIs in Location, so the current standard (RFC 7231 § 7.1.2) allows relative URIs.

Community
  • 1
  • 1
Vasiliy Faronov
  • 11,840
  • 2
  • 38
  • 49