Bug 36506

Summary: [chromium] XMLHttpRequest.send sends 'undefined' string when passed undefined value.
Product: WebKit Reporter: David Levin <levin>
Component: DOMAssignee: David Levin <levin>
Status: RESOLVED FIXED    
Severity: Normal CC: japhet
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed fix. japhet: review+, levin: commit-queue-

Description David Levin 2010-03-23 14:24:21 PDT
From http://crbug.com/33062:

Given the following JavaScript:

var x = new XMLHttpRequest(); 
x.open('POST', '/'); 
x.send(undefined);

Expected result is:

POST request with empty request body.

Instead chromium sends "undefined" as the request body.
Comment 1 David Levin 2010-03-23 14:46:31 PDT
Created attachment 51454 [details]
Proposed fix.
Comment 2 Nate Chapin 2010-03-23 14:51:53 PDT
Comment on attachment 51454 [details]
Proposed fix.

r=me
Comment 3 David Levin 2010-03-23 15:28:39 PDT
Committed as http://trac.webkit.org/changeset/56422