Patched newline issue in request() in net.js

See commit c3435ee345 for more info
This commit is contained in:
bcoles
2012-05-03 15:54:46 +09:30
parent 53c6fb5252
commit 99d47351b7

View File

@@ -146,7 +146,7 @@ beef.net = {
request: function(scheme, method, domain, port, path, anchor, data, timeout, dataType, callback) {
//check if same domain or cross domain
var cross_domain = true;
if (document.domain == domain){
if (document.domain == domain.replace(/(\r\n|\n|\r)/gm,"")) { //strip eventual line breaks
if(document.location.port == "" || document.location.port == null){
cross_domain = !(port == "80" || port == "443");
}