SWT Browser ignores cookies from AJAX requests [message #724598] |
Mon, 12 September 2011 16:04 |
Ulrik Skyt Messages: 4 Registered: September 2011 |
Junior Member |
|
|
Hello,
We are using the SWT Browser component in a Java application to access a short list of specific sites, which we control ourselves. The sites are protected by SAML, and we are evolving this into a quite complex scenario with multiple IdP's and sign-on mechanisms. Therefore we recently made a change about which resources are protected by SAML and which are not - now only the AJAX services are protected.
This means that the AJAX services (a.k.a. "XmlHttpRequests") should now initiate a browser session in order to work. But unfortunately, I experience that the Browser ignores cookies being set in the AJAX responses. In the end this leads to an infinite redirect loop, being detected and reported as an error "too many HTTP redirects".
To me, this seems to be a bug - but maybe someone can explain to me something I should be doing to make the browser accept cookies from AJAX requests? Or provide some other explanation.
The environment is Mac OSX 10.7 Lion, Java 6 (64-bit), SWT-3.7, default (=webkit) browser implementation.
Best regards,
Ulrik
|
|
|
Re: SWT Browser ignores cookies from AJAX requests [message #725327 is a reply to message #724598] |
Wed, 14 September 2011 14:10 |
Grant Gayed Messages: 2150 Registered: July 2009 |
Senior Member |
|
|
Hi Ulrik,
I haven't heard of this before, and don't have an explanation for why
it's failing. To have it investigated you should log a report with SWT
at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform&component=SWT
and provide a minimal case that demonstrates the problem.
Grant
On 9/12/2011 12:04 PM, Ulrik Skyt wrote:
> Hello,
>
> We are using the SWT Browser component in a Java application to access a
> short list of specific sites, which we control ourselves. The sites are
> protected by SAML, and we are evolving this into a quite complex
> scenario with multiple IdP's and sign-on mechanisms. Therefore we
> recently made a change about which resources are protected by SAML and
> which are not - now only the AJAX services are protected.
>
> This means that the AJAX services (a.k.a. "XmlHttpRequests") should now
> initiate a browser session in order to work. But unfortunately, I
> experience that the Browser ignores cookies being set in the AJAX
> responses. In the end this leads to an infinite redirect loop, being
> detected and reported as an error "too many HTTP redirects".
>
> To me, this seems to be a bug - but maybe someone can explain to me
> something I should be doing to make the browser accept cookies from AJAX
> requests? Or provide some other explanation.
>
> The environment is Mac OSX 10.7 Lion, Java 6 (64-bit), SWT-3.7, default
> (=webkit) browser implementation.
>
> Best regards,
> Ulrik
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02241 seconds