Created
December 14, 2012 13:36
-
-
Save profelis/4285509 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 7ade5f2830bdba1d442859ddb4e0f18cab19b31f Mon Sep 17 00:00:00 2001 | |
From: profelis <system.grand@gmail.com> | |
Date: Fri, 14 Dec 2012 15:15:48 +0200 | |
Subject: [PATCH] [jeash] Allow override requestHeaders | |
--- | |
jeash/net/URLLoader.hx | 4 ++-- | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
diff --git a/jeash/net/URLLoader.hx b/jeash/net/URLLoader.hx | |
index a510a88..a5a8d3c 100644 | |
--- a/jeash/net/URLLoader.hx | |
+++ b/jeash/net/URLLoader.hx | |
@@ -62,10 +62,10 @@ class URLLoader extends EventDispatcher | |
public function load(request:URLRequest) { | |
switch (dataFormat) { | |
case BINARY: | |
- request.requestHeaders.push(new URLRequestHeader("Content-Type","application/octet-stream")); | |
+ request.requestHeaders.unshift(new URLRequestHeader("Content-Type","application/octet-stream")); | |
default: | |
if (request.method != "GET") | |
- request.requestHeaders.push(new URLRequestHeader("Content-Type","application/x-www-form-urlencoded")); | |
+ request.requestHeaders.unshift(new URLRequestHeader("Content-Type","application/x-www-form-urlencoded")); | |
} | |
requestUrl( | |
-- | |
1.7.10.2 (Apple Git-33) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment