Hi Paul,
comments inline...
Paul Sandoz wrote:
> Hi Ayub,
>
> [Moving to the dev list]
>
> Is the problem that the browser is performing an automatic second
> request in response to the redirect *but* it is not reusing the HTTP
> accept that was used in the first request ?
Yes.
> A browser bug perhaps ?
>
> Jakub is working on a fix so we can switch on/off redirection for URI
> normalization and path canonicalization.
>
> This is making me think we should switch off redirection by default...
>
> Paul.
If I am using a XHR, and set the accept to "application/json", I would
get the response as "application/xml". Looks like XHR is using the 307
to send second
request with default mimetype, this may be a XHR bug also. So my client
code that does the JS call like eval() will fail, because it is
expecting a JSON content,
not a XML content.
Note:
Looking a the 307 Definition from
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html, it is not clear
what should be the right
behaviour for various browsers. I am using Firefox 2.0.0.6.
Thanks
Ayub
>
> Ayub Khan wrote:
>> Hi Paul,
>>
>> See the attachment for the issue I was talking about. You need a AJAX
>> code to test this. From browser there is no problem.
>>
>> Issue is if I use the uri "/A/restbean//customers//" instead of
>> "/A/restbean/customers/", there is a 307 Redirect happening, that causes
>> the Client (AJAX) code to fail. I could fix the client code, this is
>> not a problem. I think the issue is client developers will spend
>> some amount of time figuring out why a simple XHR call failed.
>>
>> Attachments:
>>
>> - 307Redirect.PNG, 307Redirect_Header.PNG show the Request and Header
>> on the server.
>> - result_307Redirect.PNG, result_307Redirect_Header.PNG show the
>> Request and Header on the server after the redirect.
>>
>> Thanks
>> Ayub
>>
>> ------------------------------------------------------------------------
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> ------------------------------------------------------------------------
>>
>