Bug 36506 - [chromium] XMLHttpRequest.send sends 'undefined' string when passed undefined value.
Summary: [chromium] XMLHttpRequest.send sends 'undefined' string when passed undefined...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: David Levin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-23 14:24 PDT by David Levin
Modified: 2010-03-23 15:28 PDT (History)
1 user (show)

See Also:


Attachments
Proposed fix. (4.88 KB, patch)
2010-03-23 14:46 PDT, David Levin
japhet: review+
levin: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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