WebView is eating our Cookies

Kevin Rushforth kevin.rushforth at oracle.com
Wed Dec 16 13:28:36 UTC 2015


I see that this bug was filed against core-libs and not javafx, so we 
have never seen the bug report until now.

-- Kevin


Fisher, Robert wrote:
> I have a question about this bug:
>
> https://bugs.openjdk.java.net/browse/JDK-8027021
>
> It's over 2 years old at this point, so I wonder if it has fallen through the cracks.  For us it means as soon as anyone instantiates a WebView anywhere in our app, our REST clients stop processing Cookies correctly.
>
> Is it on the agenda at all?
>
> Below I've included a test program using jersey-client 1.18.1 and the output in our case.
>
> Cheers,
> Rob
>
> -------------------
>
> public class WebViewBug extends Application {
>
>     public static void main(String[] args) {
>         launch(args);
>     }
>
>     @Override
>     public void start(Stage stage) throws Exception {
>         callAndPrintResponseInfo();
>         new WebView();
>         callAndPrintResponseInfo();
>     }
>
>     private void callAndPrintResponseInfo() {
>         String url = "some URL that returns a cookie in its response header";
>         Client client = Client.create();
>         ClientResponse response = client.resource(url).accept(MediaType.APPLICATION_XML_TYPE).get(ClientResponse.class);
>
>         System.out.println();
>         System.out.println("Status: " + response.getStatus());
>         System.out.println("Set-Cookie: " + response.getHeaders().getFirst("Set-Cookie"));
>         System.out.println("Content-Type: " + response.getHeaders().getFirst("Content-Type"));
>     }
> }
>
> -------------------
>
> Status: 200
> Set-Cookie: JSESSIONID=9a5873b18b843c2bece162e36b0c; Path=[not relevant]; HttpOnly
> Content-Type: application/xml
>
> Status: 200
> Set-Cookie:
> Content-Type: application/xml
>   


More information about the openjfx-dev mailing list