jump to navigation

Content-Location and Location response headers November 9, 2011

Posted by javafoo in java http, javanotes.
trackback

I thought I knew this at some point when I was doing this. But today, it had me searching again.

So just putting this here for my understanding. You would find the Content-Location header in your response, when there are alternative locations for the resource.

For ex: you visited http://www.somesite.com/home and the actual location of the resource is at http://www.somesite.com/home/default.html. Then your response would contain this header, ‘Content-Location: http://www.somesite.com/home/default.html’. Usually the response code would be 200 in this case.

You find the ‘Location’ header in your response when you are being redirected. Usually the response code would be one of 3xx in this case. So the client can redirect to the new location.

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.