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.