Reputation: 10479
I am using .NET Page Routing (not MVC) to get pretty URLs (or at least removing the file extensions) on my site.
On my search page, when a user searches for "stuff" it redirects then to /search/stuff for the results. However when I put in something like "stuff yes:" it gives me a HTTP 400 Bad Request Error.
I tried using javascript to encode the search value before being submitted, and confirmed that "stuff yes:" was converted to "staff%20yes%3A", yet when it performs the routing redirect, in the URL it shows "staff%20yes:" and causes the bad request. Why is it not saving the encoding for the typically illegal characters and how can I make it so?
Upvotes: 0
Views: 180
Reputation:
Hm. Is it possible this is happening because the :
isn't always an illegal character in URIs? For example,
foo://username:[email protected]:8042
I'm probably reaching, but it's a thought.
Upvotes: 1