Skip to content

Commit

Permalink
fixed headers and xml parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Romaniak committed May 13, 2016
1 parent 8ee9a9c commit b143c47
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
7 changes: 0 additions & 7 deletions lib/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,8 @@ exports.request = function(rurl, data, callback, exheaders, exoptions) {
if (typeof window !== 'undefined') {

headers = {
"User-Agent": "node-soap/" + VERSION,
"Accept": "text/html,application/xhtml+xml,application/xml",
"Accept-Encoding": "none",
"Accept-Charset": "utf-8",
"Content-Type" : "application/x-www-form-urlencoded",
"Connection": "close",
"Host": host
};
exheaders = exheaders || {};
for (var attr in exheaders) {
Expand Down Expand Up @@ -54,8 +49,6 @@ exports.request = function(rurl, data, callback, exheaders, exoptions) {

if (typeof data == 'string') {
headers["Content-Length"] = Buffer.byteLength(data, 'utf8');
;
headers["Content-Type"] = "application/x-www-form-urlencoded";
}

exheaders = exheaders || {};
Expand Down
2 changes: 1 addition & 1 deletion lib/wsdl.js
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ WSDL.prototype.xmlToObject = function(xml) {
topSchema = top.schema,
name = splitNSName(nsName).name;

if (topSchema && topSchema[name+'[]']) {
if (topSchema && topSchema[name+'[]'] && typeof topSchema[name+'[]']!=='string') {
if (!topObject[name]) topObject[name] = [];
topObject[name].push(obj);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "browser-soap",
"version": "1.0.3",
"version": "1.0.4",
"description": "A minimal SOAP client in javascript, so tiny it even runs in browser",
"engines": {
"node": ">=0.8.0"
Expand Down

0 comments on commit b143c47

Please sign in to comment.