Disable URL-Encoding of the parameter value for MATRIX param

Report your bugs here. We promise to deal with them.

Disable URL-Encoding of the parameter value for MATRIX param

Postby jyotishman22 » 10 Nov 2011 15:31

Hi,
Selecting the "Disable URL-Encoding of the parameter value" box for MATRIX parameters of a REST service does not stop soapUI from encoding the parameters. However when I change the parameter style to "QUERY" instead of "MATRIX" the parameters aren't encoded as expected. Could you please take a look at this issue? I am using soapUI Pro 4.0.1.

Thanks,
Jyo
jyotishman22
soapui pro users
soapui pro users
 
Posts: 5
Joined: 09 Nov 2011 22:35

Re: Disable URL-Encoding of the parameter value for MATRIX p

Postby SmartBear Support » 15 Nov 2011 14:31

Hi,

unfortunately I can't reproduce this with the current nightly build - could you attach or send us your project file containing a REST Request with a matrix parameter and its value that is not handled correctly?

thanks in advance!

regards,

/Ole
SmartBear Software
SmartBear Support
Administrator
Administrator
 
Posts: 6702
Joined: 16 Feb 2009 10:53

Re: Disable URL-Encoding of the parameter value for MATRIX p

Postby jyotishman22 » 15 Nov 2011 20:00

Hi,
I have attached a sample project here. I am using "google.com" as the service end point for the request as an example of a valid server. As you will see I have selected "Disable URL Encoding" for the "URL" parameter. I have already encoded the parameter as "http:%2F%2Fwww.eviware.com%2Fforum%2F" and do not want this to be URL encoded. However when I send the request, the parameter gets encoded.

The output from the http log is captured below:
Tue Nov 15 12:18:37 EST 2011:DEBUG:<< " <p>The requested URL <code>/rest/test;RESULT=SUCCESS; URL=http:%252F%252Fwww.eviware.com%252Fforum%252F</code> was not found on this server. <ins>That[0xe2][0x80][0x99]s all we know.</ins>[\n]"
Tue Nov 15 12:35:03 EST 2011:DEBUG:>> "GET /rest/test;RESULT=SUCCESS;URL=http:%252F%252Fwww.eviware.com%252Fforum%252F HTTP/1.1[\r][\n]"

The URL has been encoded to: "http:%252F%252Fwww.eviware.com%252Fforum%252F".

When I change the "Style" of the parameter from MATRIX to QUERY, and select the "Disable URL Encoding" option, the parameter isn't encoded as expected. The output from the http log for this case is captured below:

Tue Nov 15 12:48:44 EST 2011:DEBUG:<< " <p>The requested URL <code>/rest/test;RESULT=SUCCESS?URL=http:%"
Tue Nov 15 12:48:44 EST 2011:DEBUG:<< "2F%2Fwww.eviware.com%2Fforum%2F</code> was not found on this server. <ins>That[0xe2][0x80][0x99]s all we know.</ins>[\n]"
Tue Nov 15 12:49:26 EST 2011:DEBUG:>> "GET /rest/test;RESULT=SUCCESS?URL=http:%2F%2Fwww.eviware.com%2Fforum%2F HTTP/1.1[\r][\n]"

Thanks,
Jyo
Attachments
SampleTest-soapui-project.xml
(2.18 KiB) Downloaded 375 times
jyotishman22
soapui pro users
soapui pro users
 
Posts: 5
Joined: 09 Nov 2011 22:35

Re: Disable URL-Encoding of the parameter value for MATRIX p

Postby SmartBear Support » 15 Nov 2011 23:27

Hi,

ok thanks for this - I see what is going on now - as a temporary workaround could you try selecting the "Preencoded Endpoints" option in the Global Preferences HTTP Settings tab!?

regards!

/Ole
SmartBear Software
SmartBear Support
Administrator
Administrator
 
Posts: 6702
Joined: 16 Feb 2009 10:53

Re: Disable URL-Encoding of the parameter value for MATRIX p

Postby jyotishman22 » 16 Nov 2011 15:17

Hi,
I have already tried using that option, but it does not have any effect. I have included the output below:

Wed Nov 16 09:17:41 EST 2011:DEBUG:<< " <p>The requested URL <code>/rest/test;RESULT=SUCCESS;URL=http:%252F%252Fwww.eviware.com%252Fforum%252F</code> was not found on this server. <ins>That[0xe2][0x80][0x99]s all we know.</ins>[\n]"
Wed Nov 16 09:18:56 EST 2011:DEBUG:>> "GET /rest/test;RESULT=SUCCESS;URL=http:%252F%252Fwww.eviware.com%252Fforum%252F HTTP/1.1[\r][\n]"

As you can see, the URL is still encoded to "http:%252F%252Fwww.eviware.com%252Fforum%252F".

Thanks,
Jyo
jyotishman22
soapui pro users
soapui pro users
 
Posts: 5
Joined: 09 Nov 2011 22:35

Re: Disable URL-Encoding of the parameter value for MATRIX p

Postby SmartBear Support » 17 Nov 2011 15:10

Hi Jyo,

strange, that worked for me as a workaround. In that case I wonder if you could work around the issue by specifying the value of the parameter as a standard property (TestCase, Properties Step, etc..) and then expanding it in the URL using standard property expansion!?

Does that make sense?

regards!

/Ole
SmartBear Software
SmartBear Support
Administrator
Administrator
 
Posts: 6702
Joined: 16 Feb 2009 10:53

Re: Disable URL-Encoding of the parameter value for MATRIX p

Postby jyotishman22 » 17 Nov 2011 17:19

Hi,
I have attached a sample project using the steps you suggested as a temporary workaround. As you will see I am using http://www.google.com/rest/test;URL=${URL} as the service end point and I have setup a URL property in the previous step to substitute the value into the endpoint. I have already encoded the value as "http:%2F%2Fwww.eviware.com%2Fforum%2F" and selected the "Preencoded Endpoints" option in the Global Preferences HTTP Settings tab. I have included the output from the output from the http log below:

Thu Nov 17 10:49:49 EST 2011:DEBUG:>> "PUT /rest/test;URL=http:%252F%252Fwww.eviware.com%252Fforum%252F HTTP/1.1[\r][\n]"

As you can see the '%' is still being encoded to '%25'.

Thanks,
Jyo
jyotishman22
soapui pro users
soapui pro users
 
Posts: 5
Joined: 09 Nov 2011 22:35

Re: Disable URL-Encoding of the parameter value for MATRIX p

Postby jyotishman22 » 18 Nov 2011 22:58

Hi,
Sorry, I just realized that I had actually forgotten to attach the sample project. It is attached here.

Thanks,
Jyo
Attachments
SampleTest2-soapui-project.xml
(1.66 KiB) Downloaded 471 times
jyotishman22
soapui pro users
soapui pro users
 
Posts: 5
Joined: 09 Nov 2011 22:35

Re: Disable URL-Encoding of the parameter value for MATRIX p

Postby SmartBear Support » 23 Nov 2011 19:16

Hi

ok, thanks - I've reported this as a bug internally - I'm very sorry for the inconvenience so far.

regards!

/Ole
SmartBear Software
SmartBear Support
Administrator
Administrator
 
Posts: 6702
Joined: 16 Feb 2009 10:53


Return to soapUI Pro Bugs



cron