Forum Discussion
chris_selwyn
15 years agoNew Contributor
I have just found that SoapUI 3.5 works correctly as regards encoding of URLs. That is... if I set the "Pre-encoded URLs" flag then the URL is taken verbatim and not encoded at all.
I narrowed the culprit piece of code to be a few lines that appeared in SoapUI 3.5.1 in the sendRequest() method in
com.eviware.soapui.impl.wsdl.submit\transports.http.HttpClientRequestTransport.java.
The following is an extract from that method...
// dump file?
httpMethod.setDumpFile( PathUtils.expandPath( httpRequest.getDumpFile(),
( AbstractWsdlModelItem )httpRequest, submitContext ) );
// fix absolute URIs due to peculiarity in httpclient
URI uri = ( URI )submitContext.getProperty( BaseHttpRequestTransport.REQUEST_URI );
if( uri != null && uri.isAbsoluteURI() )
{
hostConfiguration.setHost( uri.getHost(), uri.getPort() );
String str = uri.toString();
int ix = str.indexOf( '/', str.indexOf( "//" ) + 2 );
if( ix != -1 )
{
uri = new URI( str.substring( ix ) );
httpMethod.setURI( uri );
submitContext.setProperty( BaseHttpRequestTransport.REQUEST_URI, uri );
}
}
// include request time?
The lines of code in bold are not in SoapUI 3.5 and it is my belief that this is the reason why 3.5 works and 3.5.1 does not work.
Chris Selwyn
I narrowed the culprit piece of code to be a few lines that appeared in SoapUI 3.5.1 in the sendRequest() method in
com.eviware.soapui.impl.wsdl.submit\transports.http.HttpClientRequestTransport.java.
The following is an extract from that method...
// dump file?
httpMethod.setDumpFile( PathUtils.expandPath( httpRequest.getDumpFile(),
( AbstractWsdlModelItem )httpRequest, submitContext ) );
// fix absolute URIs due to peculiarity in httpclient
URI uri = ( URI )submitContext.getProperty( BaseHttpRequestTransport.REQUEST_URI );
if( uri != null && uri.isAbsoluteURI() )
{
hostConfiguration.setHost( uri.getHost(), uri.getPort() );
String str = uri.toString();
int ix = str.indexOf( '/', str.indexOf( "//" ) + 2 );
if( ix != -1 )
{
uri = new URI( str.substring( ix ) );
httpMethod.setURI( uri );
submitContext.setProperty( BaseHttpRequestTransport.REQUEST_URI, uri );
}
}
// include request time?
The lines of code in bold are not in SoapUI 3.5 and it is my belief that this is the reason why 3.5 works and 3.5.1 does not work.
Chris Selwyn
Related Content
- 8 years ago
- 10 years ago
- 2 years ago
- 11 years ago