aspnet / BasicMiddleware

[Archived] Basic middleware components for ASP.NET Core. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
169 stars 84 forks source link

Removing substring calls #116

Closed mikaelm12 closed 7 years ago

mikaelm12 commented 7 years ago

In response to issue #80 @natemcmaster @Tratcher @muratg

Tratcher commented 7 years ago

@jkotalik ? There was a reason for this. Something about how none of the providers wanted you give the leading slash.

jkotalik commented 7 years ago

We need to have consistency between all three implementations. This, I believe, breaks it. For example: https://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module

<rewrite>
  <rules>
    <rule name="Rewrite to article.aspx">
      <match url="^article/([0-9]+)/([_0-9a-z-]+)" />
      <action type="Rewrite" url="article.aspx?id={R:1}&amp;title={R:2}" />
    </rule>
  </rules>
</rewrite>

IIS rules explicitly match on no leading slash, as well as mod_rewrite. Changing it to require leading slashes for normal rules removes consistency.

Tratcher commented 7 years ago

Yeah, let's close this.

jkotalik commented 7 years ago

Some of the changes for style are good though

mikaelm12 commented 7 years ago

Alright. I'll scrap this then