[webkit-changes] cvs commit: WebCore/manual-tests xmlhttprequest-contenttype-empty.html

Vicki vicki at opensource.apple.com
Wed Aug 17 01:07:33 PDT 2005


vicki       05/08/17 01:07:32

  Modified:    .        ChangeLog
               khtml/ecma xmlhttprequest.cpp
  Added:       manual-tests xmlhttprequest-contenttype-empty.html
  Log:
          Reviewed by Maciej.
  
          - fix <rdar://problem/4175734> Crash trying to retrieve data with
          XMLHttpRequest with Content-Type: empty
  
          Test cases added:
  	* manual-tests/xmlhttprequest-contenttype-empty.html: Added.
  
  	* khtml/ecma/xmlhttprequest.cpp:
  	(KJS::XMLHttpRequest::getValueProperty): allow empty entries when splitting to
  	create the mime type string, otherwise we access a garbage pointer when stripping
  	whitespace
  
  Revision  Changes    Path
  1.4592    +15 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.4591
  retrieving revision 1.4592
  diff -u -r1.4591 -r1.4592
  --- ChangeLog	17 Aug 2005 04:06:05 -0000	1.4591
  +++ ChangeLog	17 Aug 2005 08:07:28 -0000	1.4592
  @@ -1,3 +1,18 @@
  +2005-08-17  Vicki Murley  <vicki at apple.com>
  +
  +        Reviewed by Maciej.
  + 
  +        - fix <rdar://problem/4175734> Crash trying to retrieve data with
  +        XMLHttpRequest with Content-Type: empty
  +
  +        Test cases added: 
  +	* manual-tests/xmlhttprequest-contenttype-empty.html: Added.
  +
  +	* khtml/ecma/xmlhttprequest.cpp:
  +	(KJS::XMLHttpRequest::getValueProperty): allow empty entries when splitting to
  +	create the mime type string, otherwise we access a garbage pointer when stripping
  +	whitespace
  +
   2005-08-16  Darin Adler  <darin at apple.com>
   
           Reviewed by Maciej.
  
  
  
  1.38      +1 -1      WebCore/khtml/ecma/xmlhttprequest.cpp
  
  Index: xmlhttprequest.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/ecma/xmlhttprequest.cpp,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- xmlhttprequest.cpp	16 Aug 2005 00:47:46 -0000	1.37
  +++ xmlhttprequest.cpp	17 Aug 2005 08:07:32 -0000	1.38
  @@ -151,7 +151,7 @@
           if (header->isUndefined()) {
             mimeType = "text/xml";
           } else {
  -	  mimeType = QStringList::split(";", header->toString(exec).qstring())[0].stripWhiteSpace();
  +	  mimeType = QStringList::split(";", header->toString(exec).qstring(), true)[0].stripWhiteSpace();
           }
         } else {
           mimeType = MIMETypeOverride;
  
  
  
  1.1                  WebCore/manual-tests/xmlhttprequest-contenttype-empty.html
  
  Index: xmlhttprequest-contenttype-empty.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
          "http://www.w3.org/TR/html4/strict.dtd">
  <html lang="en">
  <head>
  </head>
  <body>
  <p><b>BUG ID:</b> <a href="rdar://problem/4175734">4175734</a> Crash trying to retrieve data with XMLHttpRequest with Content-Type: empty</p>
  
  <p id="test" style="background-color:skyblue; padding:3px;"><b>STEPS TO TEST:</b> 
  Click on the link below.  Sorry, but at the moment this test link can only be accessed if you're behind the Apple firewall.</p>
  
  <p id="success" style="background-color:palegreen; padding:3px;"><b>TEST PASS:</b> 
  No crash.
  </p>
  
  <p id="failure" style="background-color:#FF3300; padding:3px;"><b>TEST FAIL:</b>  
  Crash.
  </p>
  
  <a href="http://jersey.apple.com/test/4175734/">Click this link</a>
  </body>
  </html>
  
  
  



More information about the webkit-changes mailing list