[Web-SIG] http content-location header, and different browsers

Irmen de Jong irmen at xs4all.nl
Fri Oct 15 13:55:16 CEST 2004

Hello all,
I was just trying some new code I was writing for Snakelets with
different browsers, and stumbled across something weird.
It has to do with the HTTP Content-Location header.

What I used to do was adding a Content-Location header in the
reply, when the page was internally redirected in Snakelets.
(I thought this was a good idea, based on what I knew about
the meaning of that header). Everything worked fine. Until I
opened my website with Opera, instead of Firefox or IE....:
a few of my links had totally wrong URLs in Opera!

After a bit of searching I now know that at least Opera implements
the HTTP specification, which says in
that "The value of Content-Location also defines the base URI
for the entity." So Opera was -rightfully so- using the value
of the content-location header as the new base URI, and the
other browsers I tried *do not do that*. Firefox has a WONTFIX-bug
on this (bugzilla #109553) because they feel that it would break
a lot of websites that supply faulty content-location headers.

In the end, I decided to just not generate this header anymore.
And my site started working in Opera too ;-)

What do you think of this?

--Irmen de Jong.

More information about the Web-SIG mailing list