<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>140674</bug_id>
          
          <creation_ts>2015-01-20 05:55:12 -0800</creation_ts>
          <short_desc>Requests made during applet teardown are missing browser managed session cookies</short_desc>
          <delta_ts>2015-01-21 22:12:53 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Johnathon Neuschafer">johnathon.neuschafer</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1062710</commentid>
    <comment_count>0</comment_count>
      <attachid>244985</attachid>
    <who name="Johnathon Neuschafer">johnathon.neuschafer</who>
    <bug_when>2015-01-20 05:55:12 -0800</bug_when>
    <thetext>Created attachment 244985
Sources for an applet which sends requests throughout the applet life cycle and outputs cookies

When an applet sends a request during applet teardown in the stop() or destroy() methods, the requests will not contain browser managed session cookies. The issue has been reproduced using Chrome 39 and Safari 8.0. It does not appear to be an issue with Internet Explorer 11 or Firefox 34.

I&apos;ve attached sources for an applet and servlet that can be used to reproduce the issue.

Here&apos;s the Java console log with applet output and logging turned up:

basic: Applet loaded.
basic: Applet resized and added to parent container
basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 2071822 us, pluginInit dt 3468065 us, TotalTime: 5539887 us
basic: Applet initialized
basic: Starting applet
basic: completed perf rollup
Applet Start
Querying session to create if necessary
Cookies before sending request
network: Cache entry not found [url: http://localhost:8080/testsession/login, version: null]
network: Connecting http://localhost:8080/testsession/login with proxy=DIRECT
network: Connecting http://localhost:8080/ with proxy=DIRECT
network: Server http://localhost:8080/testsession/login requesting to set-cookie with &quot;JSESSIONID=CC22D1BCA967E61F8CD89415E58C4389; Path=/testsession/&quot;
cache: http://localhost:8080/testsession/login is not cacheable.
Cookies set in response
Cookie: JSESSIONID=CC22D1BCA967E61F8CD89415E58C4389; Path=/testsession/
Querying session again to ensure persistence
Cookies before sending request
network: Connecting http://localhost:8080/testsession/login with cookie &quot;JSESSIONID=CC22D1BCA967E61F8CD89415E58C4389&quot;
Cookie: JSESSIONID=CC22D1BCA967E61F8CD89415E58C4389
network: Cache entry not found [url: http://localhost:8080/testsession/login, version: null]
network: Connecting http://localhost:8080/testsession/login with proxy=DIRECT
network: Connecting http://localhost:8080/testsession/login with cookie &quot;JSESSIONID=CC22D1BCA967E61F8CD89415E58C4389&quot;
cache: http://localhost:8080/testsession/login is not cacheable.
Cookies set in response
basic: Applet made visible
basic: Applet started
basic: Told clients applet is started
basic: Starting applet teardown
Applet Stop
Cookies before sending request
network: Cache entry not found [url: http://localhost:8080/testsession/login, version: null]
network: Connecting http://localhost:8080/testsession/login with proxy=DIRECT
network: Connecting http://localhost:8080/ with proxy=DIRECT
network: Server http://localhost:8080/testsession/login requesting to set-cookie with &quot;JSESSIONID=60B42A38C46FA019C6A0E73E162763AC; Path=/testsession/&quot;
cache: http://localhost:8080/testsession/login is not cacheable.
Cookies set in response
Cookie: JSESSIONID=60B42A38C46FA019C6A0E73E162763AC; Path=/testsession/
Applet Destroy
Cookies before sending request
network: Cache entry not found [url: http://localhost:8080/testsession/login, version: null]
network: Connecting http://localhost:8080/testsession/login with proxy=DIRECT
network: Server http://localhost:8080/testsession/login requesting to set-cookie with &quot;JSESSIONID=58ADF12DB2B5AE8A6D0D82F5E1209B92; Path=/testsession/&quot;
cache: http://localhost:8080/testsession/login is not cacheable.
Cookies set in response
Cookie: JSESSIONID=58ADF12DB2B5AE8A6D0D82F5E1209B92; Path=/testsession/
basic: Finished applet teardown
basic: Removed progress listener: sun.plugin.util.ProgressMonitorAdapter@7ca9bd
basic: PluginMain.unregisterApplet: 15 from mananger sun.plugin2.applet.Applet2Manager@196fffc</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>244985</attachid>
            <date>2015-01-20 05:55:12 -0800</date>
            <delta_ts>2015-01-20 05:55:12 -0800</delta_ts>
            <desc>Sources for an applet which sends requests throughout the applet life cycle and outputs cookies</desc>
            <filename>javasessiontest.zip</filename>
            <type>application/x-zip-compressed</type>
            <size>1191</size>
            <attacher name="Johnathon Neuschafer">johnathon.neuschafer</attacher>
            
              <data encoding="base64">UEsDBBQAAAAIAPVwL0Y4V1ThwAAAAHwBAAARAAAATG9naW5TZXJ2bGV0LmphdmGNT80KgkAQvu9T
DNFBoZTOXoIOdQiF7AVMB9uw3W1nFCN89xZ/IqiDc5jfb+b7Rt6Ntgy3rMnagNA2FXJwZTbBwbl0
aERiFuyEjxppPpqMVoSREKa+VDKHvMqI4KhLqUYMYMuoCoKvPfES4GybNGitLLCvxguNlgUUeo/s
/eoCO8QV/FHhhkPi9/ccx2CfvvuDd1o5OXx+GvQW7LSFpsqkWvgRhOEyTuJ1fEzXm+W0PDEGJXKK
RFIrz4/6aSc68QZQSwMEFAAAAAgAt3gzRqiEB8GjAgAA4wgAABYAAABTZXNzaW9uVGVzdEFwcGxl
dC5qYXZhrVXBUtswEL37K1Sf5Cn1B0DToQN0YIYOFEN7FvYCKookVnIg0+Hfu7IVHNsJSTrVwba0
3n1vtW8lObUGPfstZiIX1irw+dfmdZAsm6TJzy5OXkqwX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