Created
August 15, 2017 20:32
-
-
Save debugthings/c536912a3d0044103043d7a84c8e24c1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.VisualStudio.TestTools.WebTesting; | |
| using System.ComponentModel; | |
| namespace CustomPlugin | |
| { | |
| [DisplayName("Replace Encoded Slash")] | |
| [Description("Replaces %2F with %252F to avoid the doubleslash (//) escape.")] | |
| public class FixFilter : WebTestRequestPlugin | |
| { | |
| public FixFilter() { } | |
| public override void PostRequest(object sender, PostRequestEventArgs e) | |
| { | |
| if (e.Request.HasDependentRequests) | |
| { | |
| foreach (var item in e.Request.DependentRequests) | |
| { | |
| item.Url = item.Url.Replace("%2F", "%252F"); | |
| } | |
| } | |
| base.PostRequest(sender, e); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment