Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
48f10b55
...
48f10b55b5cc140c90e5ffcf9f2f34ed10e2cc09
authored
2014-02-04 00:13:29 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed #819 - don't override mime for std contents in sendAJAX
1 parent
eb78ac3b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
modules/clientutils.js
modules/clientutils.js
View file @
48f10b5
...
...
@@ -376,7 +376,9 @@
*/
this
.
getBinary
=
function
getBinary
(
url
,
method
,
data
)
{
try
{
return
this
.
sendAJAX
(
url
,
method
,
data
,
false
);
return
this
.
sendAJAX
(
url
,
method
,
data
,
false
,
{
overrideMimeType
:
"text/plain; charset=x-user-defined"
});
}
catch
(
e
)
{
if
(
e
.
name
===
"NETWORK_ERR"
&&
e
.
code
===
101
)
{
this
.
log
(
"getBinary(): Unfortunately, casperjs cannot make cross domain ajax requests"
,
"warning"
);
...
...
@@ -758,7 +760,9 @@
var
contentType
=
settings
&&
settings
.
contentType
||
"application/x-www-form-urlencoded"
;
xhr
.
open
(
method
,
url
,
!!
async
);
this
.
log
(
"sendAJAX(): Using HTTP method: '"
+
method
+
"'"
,
"debug"
);
xhr
.
overrideMimeType
(
"text/plain; charset=x-user-defined"
);
if
(
settings
&&
settings
.
overrideMimeType
)
{
xhr
.
overrideMimeType
(
settings
.
overrideMimeType
);
}
if
(
method
===
"POST"
)
{
if
(
typeof
data
===
"object"
)
{
for
(
var
k
in
data
)
{
...
...
Please
register
or
sign in
to post a comment