forked from jeresig/env-js
-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
The default implementation doesn't work appropriately for POST/PUT requests. The server receives an empty message body. There needs to be added 'Content-Length' parameter to the header of the request. I changed the code in envjs/platform/spydermonkey.js as follows:
if(data && (xhr.method == "PUT" || xhr.method == "POST" )) {
if(data instanceof Document){
data = (new XMLSerializer()).serializeToString(data);
} else {
data = data + ''
}
if(data.length&&data.length>0){
connection.putheader('Content-Length', data.length);
connection.endheaders(data);
}else{
connection.endheaders();
}
}else{
connection.endheaders();
}
Metadata
Metadata
Assignees
Labels
No labels