This is a migrated thread and some comments may be shown as answers.

Url Decoding

1 Answer 108 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lee
Top achievements
Rank 1
Lee asked on 14 Jul 2011, 06:15 PM
We currently have a query string that is required in our website that is encrypted, it is url encoded.

When I navigate there with Test Studio, it is automatically decoding the query string.

How can I turn off this option, it is failing since the encryption requires it to be encoded

1 Answer, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 15 Jul 2011, 03:39 PM
Hello Lee,

This is a known issue and unfortunately there's not much we can do to help. This behavior is caused by the .NET logic we use and not by implementation specific to Test Studio. The culprit is the URI Class. Please refer to this excerpt from the article:

By default, any reserved characters in the URI are escaped in accordance with RFC 2396. This behavior changes if International Resource Identifiers or International Domain Name parsing is enabled in which case reserved characters in the URI are escaped in accordance with RFC 3986 and RFC 3987.
 
As part of canonicalization in the constructor for some schemes, escaped representations are compacted. The schemes for which URI will compact escaped sequences include the following: file, http, https, net.pipe, and net.tcp. For all other schemes, escaped sequences are not compacted. For example: if you percent encode the two dots ".." as "%2E%2E" then the URI constructor will compact this sequence for some schemes. For example, the following code sample shows a URI constructor for the http scheme.
 
Copy
Uri uri = new Uri("http://myUrl/%2E%2E/%2E%2E"); Console.WriteLine(uri.AbsoluteUri); Console.WriteLine(uri.PathAndQuery);
 
When this code is executed, it returns the following output with the escaped sequence compacted.
 
Copy

Previous customers have worked around the issue by creating a page with hyperlinks in it. By clicking a link with the URL, the issue was bypassed. I hope this helps.

Best wishes,
Anthony
the Telerik team
Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

Have you looked at the new Online User Guide for Telerik Test Studio?
Tags
General Discussions
Asked by
Lee
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Share this question
or