Hi
On 18/06/13 07:11, Rice Yeh wrote:
Hi,
   I use ResponseBuilder to set location header. The location is started
with "/" but it will changed by cxf jaxrs to be relative to the base uri.
Is not a path starting with '/' absolute? My code is like below:

return Response
.ok()
.header("Location", kontinue)
.build();

To me "absolute" means "complete", but if the client gets say

"Location: /someaddress"

then it would still have to resolve it against the base URI, right ?

ResponseBuilder implementation uses URI.isAbsolute() call to figure out if it is an absolute or relative one (as per ResponseBuilder.location docs), I think treating "/someaddress" in context of dealing with URI as being relative is right...

Do you have a case where a client expects

"Location: /someaddress",

example, it has been written such that it expects the value of Location be concatenated with the base URI ?

Sergey


[1] http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-22#section-7.1.2

Rice


Reply via email to