mattk
mattk

Reputation: 1365

WebApi / Routing with URL Encoding

Related to this: URL-encoded slash in URL

I used Mehrdad Afshari's answer (wildcard route param) which works mostly! However, multiple slashes are converted to a single slash.

My route is resource/{*url}

With GET resource/abc%2fdef my controller method is called with abc/def.

With GET resource/abc%2f%2f%2f%2fdef my controller method is again called with abc/def. The extra slashes are lost.

Upvotes: 2

Views: 11072

Answers (1)

Related Questions