Bug 16379

Summary: REGRESSION(r28525): Failures in http/tests/xmlhttprequest/response-encoding.html and fast/dom/xmlhttprequest-html-response-encoding.html
Product: WebKit Reporter: Mark Rowe (bdash) <mrowe>
Component: JavaScriptCoreAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, mrowe
Priority: P1 Keywords: LayoutTestFailure, Regression
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
patch sam: review+

Description Mark Rowe (bdash) 2007-12-10 06:25:55 PST
http/tests/xmlhttprequest/response-encoding.html and fast/dom/xmlhttprequest-html-response-encoding.html started failing after r28525.  As of r28581 they are still failing.

A reduction is:
print("foo<body>bar</body>baz".replace(/.*<body>(.*)<\/body>.*/, "$1") == "bar");

With Safari 3 this displays true, but with TOT it displays false as it evaluates to "fbar" rather than "bar".
Comment 1 Mark Rowe (bdash) 2007-12-10 06:30:06 PST
A clearer reduction is the following:
"foo<body>bar</body>baz".replace(/.*<body>(.*)<\/body>.*/, "")

This should evaluate to the empty string, but is currently evaluating to "f".
Comment 2 Darin Adler 2007-12-10 21:10:30 PST
Created attachment 17836 [details]
patch
Comment 3 Sam Weinig 2007-12-10 21:52:13 PST
Comment on attachment 17836 [details]
patch

Beautiful as always.  r=me
Comment 4 Darin Adler 2007-12-10 22:09:02 PST
Committed revision 28609.