mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 07:18:16 +08:00
Make Ocelot not add forward slash to downstream url (#158)
* removed code where we add a trailing slash as this means if we request /1.txt/ instead of /1.txt then some servers will not return the resource at /1.txt. After reading up it seems if you dont have a trailing slash then its a file, if you do then its a resource * test for 145 * removed unused code * fix broken build..my bad
This commit is contained in:
@ -68,7 +68,7 @@ namespace Ocelot.UnitTests.DownstreamRouteFinder
|
||||
|
||||
|
||||
[Fact]
|
||||
public void should_append_slash_to_upstream_url_path()
|
||||
public void should_not_append_slash_to_upstream_url_path()
|
||||
{
|
||||
var serviceProviderConfig = new ServiceProviderConfigurationBuilder().Build();
|
||||
|
||||
@ -97,7 +97,7 @@ namespace Ocelot.UnitTests.DownstreamRouteFinder
|
||||
.WithUpstreamHttpMethod(new List<string> { "Get" })
|
||||
.Build()
|
||||
)))
|
||||
.And(x => x.ThenTheUrlMatcherIsCalledCorrectly("matchInUrlMatcher/"))
|
||||
.And(x => x.ThenTheUrlMatcherIsCalledCorrectly("matchInUrlMatcher"))
|
||||
.BDDfy();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user