Skip to content

Commit

Permalink
drop WO5.3 version of createRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
darkv committed Dec 11, 2012
1 parent 61628f5 commit 65205bb
Showing 1 changed file with 23 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1422,28 +1422,34 @@ public void run() {
}
}

/**
* Creates the request object for this loop. Calls _createRequest(). For WO
* 5.3.
*/
@Deprecated
public WORequest createRequest(String aMethod, String aURL, String anHTTPVersion, NSDictionary someHeaders, NSData aContent, NSDictionary someInfo) {
return _createRequest(aMethod, aURL, anHTTPVersion, someHeaders, aContent, someInfo);
}

/**
* Creates the request object for this loop. Calls _createRequest(). For WO
* 5.4.
*/
@Override
public WORequest createRequest(String method, String aurl, String anHTTPVersion, Map<String, ? extends List<String>> someHeaders, NSData content, Map<String, Object> someInfo) {
return _createRequest(method, aurl, anHTTPVersion, (someHeaders != null ? new NSDictionary<String, Object>(someHeaders, true) : null), content, (someInfo != null ? new NSDictionary<String, Object>(someInfo, true) : null));
public WORequest createRequest(String aMethod, String aURL, String anHTTPVersion, Map<String, ? extends List<String>> someHeaders, NSData aContent, Map<String, Object> someInfo) {
// Workaround for #3428067 (Apache Server Side Include module will feed
// "INCLUDED" as the HTTP version, which causes a request object not to
// be created by an exception.
if (anHTTPVersion == null || anHTTPVersion.startsWith("INCLUDED")) {
anHTTPVersion = "HTTP/1.0";
}

// Workaround for Safari on Leopard bug (post followed by redirect to GET incorrectly has content-type header).
// The content-type header makes the WO parser only look at the content. Which is empty.
// http://lists.macosforge.org/pipermail/webkit-unassigned/2007-November/053847.html
// http://jira.atlassian.com/browse/JRA-13791
if ("GET".equalsIgnoreCase(aMethod) && someHeaders != null && someHeaders.get("content-type") != null) {
someHeaders.remove("content-type");
}

if (rewriteDirectConnectURL()) {
aURL = adaptorPath() + name() + applicationExtension() + aURL;
}

return new ERXRequest(aMethod, aURL, anHTTPVersion, someHeaders, aContent, someInfo);
}

/**
* Bottleneck for WORequest creation in WO 5.3 and 5.4 to use an
* {@link ERXRequest} object that fixes a bug with localization.
* @deprecated use {@link #createRequest(String, String, String, Map, NSData, Map)} instead
*/
@Deprecated
protected WORequest _createRequest(String aMethod, String aURL, String anHTTPVersion, NSDictionary someHeaders, NSData aContent, NSDictionary someInfo) {
// Workaround for #3428067 (Apache Server Side Include module will feed
// "INCLUDED" as the HTTP version, which causes a request object not to
Expand Down

0 comments on commit 65205bb

Please sign in to comment.