<?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>14149</bug_id>
          
          <creation_ts>2007-06-14 14:35:37 -0700</creation_ts>
          <short_desc>multipart/x-mixed-replace responses that switch content-types are not handled properly</short_desc>
          <delta_ts>2010-08-16 10:26:46 -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>523.x (Safari 3)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Kilzer (:ddkilzer)">ddkilzer</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>dev+webkit</cc>
    
    <cc>levin</cc>
    
    <cc>mackyle</cc>
    
    <cc>mitz</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>7522</commentid>
    <comment_count>0</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-06-14 14:35:37 -0700</bug_when>
    <thetext>* SUMMARY
An http response that switches between different content-types is not handled correctly.  The first example goes from text/plain to text/html to text/plain.  (This may be related to Bug 4151.)

* STEPS TO REPRODUCE
1. Launch Safari/WebKit.
2. Access CGI script attachment on a web server.

* EXPECTED RESULTS
The URL should display a text/plain page with &quot;1. text/plain&quot;, then a text/html page with &quot;2. text/html&quot;, and finally a text/plain page with &quot;3. text/plain&quot;.

* ACTUAL RESULTS
On a debug build of WebKit r23528 with Safari 3.0 (522.11) on Mac OS X 10.4.9 (8P135), an assert fires.

On Safari 3.0 (522.11) on Mac OS X 10.4.9 (8P135), it prints &quot;--&quot;, then &quot;2. text/html&quot;, then adds a plain text &quot;--&quot; to the page with &quot;2. text/html&quot;.

* REGRESSION
Not tested with Safari 2.0.4 (419.3) yet.

* NOTES
This may be related to Bug 4151.

Console output from debug build:

ASSERTION FAILED: m_frame-&gt;document()-&gt;parsing()
(/path/to/WebKit/WebCore/loader/FrameLoader.cpp:1597 addData)
Segmentation fault

Stack trace from debug build:

Version:        3.0 (522.11)
Build Version:  2
Project Name:   WebBrowser
Source Version: 45221100

PID:    9319
Thread: 0

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_INVALID_ADDRESS (0x0001) at 0xbbadbeef

Thread 0 Crashed:
0   com.apple.WebCore        	0x0149f1d0 WebCore::FrameLoader::addData(char const*, int) + 296 (FrameLoader.cpp:1597)
1   com.apple.WebCore        	0x0111f6a8 -[WebCoreFrameBridge addData:] + 232 (WebCoreFrameBridge.mm:290)
2   com.apple.WebCore        	0x011282dc -[WebCoreFrameBridge receivedData:textEncodingName:] + 316 (WebCoreFrameBridge.mm:1432)
3   com.apple.WebKit         	0x00343aa4 -[WebHTMLRepresentation finishedLoadingWithDataSource:] + 368 (WebHTMLRepresentation.mm:236)
4   com.apple.WebKit         	0x0033a9b8 -[WebDataSource(WebInternal) _finishedLoading] + 112 (WebDataSource.mm:169)
5   com.apple.WebKit         	0x003c7ad0 WebFrameLoaderClient::finishedLoading(WebCore::DocumentLoader*) + 76
6   com.apple.WebCore        	0x014939e0 WebCore::FrameLoader::finishedLoadingDocument(WebCore::DocumentLoader*) + 76 (FrameLoader.cpp:2660)
7   com.apple.WebCore        	0x014ab6cc WebCore::DocumentLoader::finishedLoading() + 84 (DocumentLoader.cpp:318)
8   com.apple.WebCore        	0x0149cc3c WebCore::FrameLoader::finishedLoading() + 96 (FrameLoader.cpp:2602)
9   com.apple.WebCore        	0x014abd3c WebCore::MainResourceLoader::didFinishLoading() + 272 (MainResourceLoader.cpp:304)
10  com.apple.WebCore        	0x014adeb8 WebCore::ResourceLoader::didFinishLoading(WebCore::ResourceHandle*) + 60
11  com.apple.WebCore        	0x01482a60 -[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:] + 144 (ResourceHandleMac.mm:370)
12  com.apple.Foundation     	0x92c1589c -[NSURLConnection(NSURLConnectionInternal) _sendDidFinishLoadingCallback] + 188
13  com.apple.Foundation     	0x92c13b08 -[NSURLConnection(NSURLConnectionInternal) _sendCallbacks] + 556
14  com.apple.Foundation     	0x92c13860 _sendCallbacks + 156
15  com.apple.CoreFoundation 	0x907df4fc __CFRunLoopDoSources0 + 384
16  com.apple.CoreFoundation 	0x907dea2c __CFRunLoopRun + 452
17  com.apple.CoreFoundation 	0x907de4ac CFRunLoopRunSpecific + 268
18  com.apple.HIToolbox      	0x9329bb20 RunCurrentEventLoopInMode + 264
19  com.apple.HIToolbox      	0x9329b1b4 ReceiveNextEventCommon + 380
20  com.apple.HIToolbox      	0x9329b020 BlockUntilNextEventMatchingListInMode + 96
21  com.apple.AppKit         	0x937a1ae4 _DPSNextEvent + 384
22  com.apple.AppKit         	0x937a17a8 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 116
23  com.apple.Safari         	0x00006770 0x1000 + 22384
24  com.apple.AppKit         	0x9379dcec -[NSApplication run] + 472
25  com.apple.AppKit         	0x9388e87c NSApplicationMain + 452
26  com.apple.Safari         	0x0000244c 0x1000 + 5196
27  com.apple.Safari         	0x0004f1b0 0x1000 + 319920</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7521</commentid>
    <comment_count>1</comment_count>
      <attachid>15032</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-06-14 14:37:44 -0700</bug_when>
    <thetext>Created attachment 15032
Test case (CGI script)

This is a Perl script that should be saved on a web server and executed as a CGI script.

It requires Perl and the CGI.pm module.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7519</commentid>
    <comment_count>2</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-06-14 14:39:48 -0700</bug_when>
    <thetext>Note that this works fine in Firefox 2.0.0.4 and Opera 9.21 on Mac OS X 10.4.9 (8P135).

It would be interesting to know if this works on MSIE 6/7.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7509</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-06-14 15:27:15 -0700</bug_when>
    <thetext>&lt;rdar://problem/5271175&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7478</commentid>
    <comment_count>4</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-06-14 22:34:24 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; * NOTES
&gt; This may be related to Bug 4151.

It is not related to Bug 4151.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1140</commentid>
    <comment_count>5</comment_count>
    <who name="Matt Lilek">dev+webkit</who>
    <bug_when>2007-08-30 18:26:29 -0700</bug_when>
    <thetext>I&apos;m hitting this when I click either of the links at &lt;http://nerget.com/editable_svg.html&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1121</commentid>
    <comment_count>6</comment_count>
    <who name="">mitz</who>
    <bug_when>2007-08-30 23:49:17 -0700</bug_when>
    <thetext>If I remember correctly, you also hit that assert if you load a standalone multipart/x-mixed-replace image in an iframe.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64614</commentid>
    <comment_count>7</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-12-18 05:20:48 -0800</bug_when>
    <thetext>May  be related to Bug 14392.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>159841</commentid>
    <comment_count>8</comment_count>
    <who name="David Levin">levin</who>
    <bug_when>2009-11-02 10:33:15 -0800</bug_when>
    <thetext>*** Bug 31015 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>15032</attachid>
            <date>2007-06-14 14:37:44 -0700</date>
            <delta_ts>2007-06-14 14:37:44 -0700</delta_ts>
            <desc>Test case (CGI script)</desc>
            <filename>mp.cgi</filename>
            <type>text/perl</type>
            <size>610</size>
            <attacher name="David Kilzer (:ddkilzer)">ddkilzer</attacher>
            
              <data encoding="base64">IyEvdXNyL2Jpbi9wZXJsCgp1c2Ugc3RyaWN0Owp1c2Ugd2FybmluZ3M7Cgp1c2UgQ0dJIHF3Lzpw
dXNoLzsKCiR8ID0gMTsKCnByaW50IDw8X19FTkRfXzsKQ29udGVudC1UeXBlOiBtdWx0aXBhcnQv
eC1taXhlZC1yZXBsYWNlOyBib3VuZGFyeT0iLS0tLWhlcmUtd2UtZ28iCgpXQVJOSU5HOiBZT1VS
IEJST1dTRVIgRE9FU04nVCBTVVBQT1JUIFRISVMgU0VSVkVSLVBVU0ggVEVDSE5PTE9HWS4KLS0t
LS0taGVyZS13ZS1nbwpDb250ZW50LVR5cGU6IHRleHQvcGxhaW4KCjEuIHRleHQvcGxhaW4KCl9f
RU5EX18KCnNsZWVwIDI7CgpwcmludCA8PF9fRU5EX187Ci0tLS0tLWhlcmUtd2UtZ28KQ29udGVu
dC1UeXBlOiB0ZXh0L2h0bWwKCjxwPgo8b2wgc3RhcnQ9IjIiPgo8bGk+dGV4dC9odG1sPC9saT4K
PC9vbD4KPC9wPgoKX19FTkRfXwoKc2xlZXAgMjsKCnByaW50IDw8X19FTkRfXzsKLS0tLS0taGVy
ZS13ZS1nbwpDb250ZW50LVR5cGU6IHRleHQvcGxhaW4KCgoKMy4gdGV4dC9wbGFpbgoKLS0tLS0t
aGVyZS13ZS1nby0tCldBUk5JTkc6IFlPVVIgQlJPV1NFUiBET0VTTidUIFNVUFBPUlQgVEhJUyBT
RVJWRVItUFVTSCBURUNITk9MT0dZLgpfX0VORF9fCgpleGl0IDA7Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>