Url Decoding

2 posts, 0 answers
  1. Lee
    Lee avatar
    4 posts
    Member since:
    May 2009

    Posted 14 Jul 2011 Link to this post

    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
  2. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 15 Jul 2011 Link to this post

    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?
Back to Top