<?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>244637</bug_id>
          
          <creation_ts>2022-08-31 15:11:32 -0700</creation_ts>
          <short_desc>CSP 3: Update Content Security Policy when header sent as part of a 304 response</short_desc>
          <delta_ts>2023-01-15 10:08:43 -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>Page Loading</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Hercules Hjalmarsson">hhjalmarsson</reporter>
          <assigned_to name="Ryan Reno">rreno</assigned_to>
          <cc>achristensen</cc>
    
    <cc>beidson</cc>
    
    <cc>bfulgham</cc>
    
    <cc>rreno</cc>
    
    <cc>webkit-bot-watchers-bugzilla</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wilander</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1895303</commentid>
    <comment_count>0</comment_count>
    <who name="Hercules Hjalmarsson">hhjalmarsson</who>
    <bug_when>2022-08-31 15:11:32 -0700</bug_when>
    <thetext>imported/w3c/web-platform-tests/content-security-policy/generic/304-response-should-update-csp.sub.html

Is a constant text failure on macOS wk1 ToT and since 253966@main when it was un-skipped. It appears that this test is failing expectedly on wk2 but passing on wk1. I&apos;m unsure which is correct after un-skip.

HISTORY:
https://results.webkit.org/?suite=layout-tests&amp;test=imported/w3c/web-platform-tests/content-security-policy/generic/304-response-should-update-csp.sub.html

DIFF:
@@ -2,6 +2,6 @@

 PASS Test that the first frame uses nonce abc
 PASS Test that the first frame does not use nonce def
-FAIL Test that the second frame uses nonce def assert_unreached: Unexpected message received Reached unreachable code
-FAIL Test that the second frame does not use nonce abc assert_unreached: Unexpected message received Reached unreachable code
+PASS Test that the second frame uses nonce def
+PASS Test that the second frame does not use nonce abc</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1895304</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-08-31 15:11:53 -0700</bug_when>
    <thetext>&lt;rdar://problem/99405897&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1895306</commentid>
    <comment_count>2</comment_count>
    <who name="Hercules Hjalmarsson">hhjalmarsson</who>
    <bug_when>2022-08-31 15:13:01 -0700</bug_when>
    <thetext>My previous comment is mentioning failing expectedly from the DIFF output and not in the history.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1895309</commentid>
    <comment_count>3</comment_count>
    <who name="Hercules Hjalmarsson">hhjalmarsson</who>
    <bug_when>2022-08-31 15:14:05 -0700</bug_when>
    <thetext>This issue can be bisected to 253966@main using command:

run-webkit-tests --iterations=2 -1 imported/w3c/web-platform-tests/content-security-policy/generic/304-response-should-update-csp.sub.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1895318</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-08-31 15:27:30 -0700</bug_when>
    <thetext>Test gardening commit 254011@main (f787f2f60509): &lt;https://commits.webkit.org/254011@main&gt;

Reviewed commits have been landed. Closing PR #3881 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1925363</commentid>
    <comment_count>5</comment_count>
    <who name="Ryan Reno">rreno</who>
    <bug_when>2023-01-13 08:39:33 -0800</bug_when>
    <thetext>We aren&apos;t updating the CSP when we get a new header as part of a 304 response which is why this test is failing.

See discussion https://github.com/w3c/webappsec-csp/issues/161</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1925367</commentid>
    <comment_count>6</comment_count>
    <who name="Ryan Reno">rreno</who>
    <bug_when>2023-01-13 08:56:57 -0800</bug_when>
    <thetext>We also fail https://wpt.fyi/results/cors/304.htm?label=experimental&amp;label=master&amp;aligned

So we likely fail any WPT that tests our behavior w.r.t. updating the cache entry upon a 304 response.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1925387</commentid>
    <comment_count>7</comment_count>
    <who name="Ryan Reno">rreno</who>
    <bug_when>2023-01-13 10:57:48 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/8629</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1925685</commentid>
    <comment_count>8</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-01-15 10:08:41 -0800</bug_when>
    <thetext>Committed 258931@main (9bcb547791aa): &lt;https://commits.webkit.org/258931@main&gt;

Reviewed commits have been landed. Closing PR #8629 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>