mirror of https://github.com/apache/activemq.git
AMQ-4058: http transport should not use uri parameters for remote url.
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1386573 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3b4aadca7b
commit
6cc5f40bf7
|
@ -17,6 +17,7 @@
|
|||
package org.apache.activemq.transport.http;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.HashMap;
|
||||
|
@ -66,7 +67,16 @@ public class HttpTransportFactory extends TransportFactory {
|
|||
|
||||
protected Transport createTransport(URI location, WireFormat wf) throws IOException {
|
||||
TextWireFormat textWireFormat = asTextWireFormat(wf);
|
||||
return new HttpClientTransport(textWireFormat, location);
|
||||
// need to remove options from uri
|
||||
URI uri;
|
||||
try {
|
||||
uri = URISupport.removeQuery(location);
|
||||
} catch (URISyntaxException e) {
|
||||
MalformedURLException cause = new MalformedURLException("Error removing query on " + location);
|
||||
cause.initCause(e);
|
||||
throw cause;
|
||||
}
|
||||
return new HttpClientTransport(textWireFormat, uri);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
|
|
|
@ -54,6 +54,15 @@ public class HttpsTransportFactory extends HttpTransportFactory {
|
|||
}
|
||||
|
||||
protected Transport createTransport(URI location, WireFormat wf) throws MalformedURLException {
|
||||
return new HttpsClientTransport(asTextWireFormat(wf), location);
|
||||
// need to remove options from uri
|
||||
URI uri;
|
||||
try {
|
||||
uri = URISupport.removeQuery(location);
|
||||
} catch (URISyntaxException e) {
|
||||
MalformedURLException cause = new MalformedURLException("Error removing query on " + location);
|
||||
cause.initCause(e);
|
||||
throw cause;
|
||||
}
|
||||
return new HttpsClientTransport(asTextWireFormat(wf), uri);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue