<?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>56716</bug_id>
          
          <creation_ts>2011-03-19 14:40:10 -0700</creation_ts>
          <short_desc>Authorization header broken after 302 redirect</short_desc>
          <delta_ts>2024-10-17 13:23:29 -0700</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>528+ (Nightly build)</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>OS X 10.6</op_sys>
          <bug_status>UNCONFIRMED</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=239944</see_also>
          <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>0</everconfirmed>
          <reporter name="Mika Tuupola">tuupola</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>tom</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>370170</commentid>
    <comment_count>0</comment_count>
    <who name="Mika Tuupola">tuupola</who>
    <bug_when>2011-03-19 14:40:10 -0700</bug_when>
    <thetext>Authorization header is broken after 302 redirect if you do a page reload immediately after redirect. When doing the reload header looks like this:

Authorization: Basic dGVzdDp0ZXN0,Basic dGVzdDp0ZXN0

when it should be like this:

Authorization: Basic dGVzdDp0ZXN0

Example code which reproduces the problem together with tcpdump of all headers can be found at: https://gist.github.com/874847 

Open the page. Login with test and test. Reload a few times. Page loads fine. Then click the link which make 302 redirect back to original page. Now when you reload it asks for   username and password again. If you check the logs you can see credentials are now broken.

There is also another test page at http://www.appelsiini.net/bugs/safari_auth/ (user: test, password: test). However Apache can recover from broken header and does not ask for password again. If you sniff the traffic you can still see the broken header.

Tested with Safari 5.0.4 (6533.20.27), Safari 5.0.3 (6533.19.4) and latest Webkit Nightly 5.0.3 (6533.19.4, r80833).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>370252</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-03-20 18:17:25 -0700</bug_when>
    <thetext>&lt;rdar://problem/9160498&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>