# Reproduction

1. Pull up something with a wildcard tag which matches lots of tags. I ran into this while using the django~ tag.
2. Change the sort order to featured (or any of the links below Ask Question). For django~, you end up at a URL like this.
• The response headers indicate a 404 response, even though the page is blank.
• ## The URL is 2,262 characters long, which the browser and/or server doesn't handle well.

Microsoft has documented their maximum URL length in IE at 2,083 characters. I don't know if other browsers have different limitations, but Firefox and Safari both receive 404 errors.
• If you do this on wildcard tags which match much fewer tags, such as this one (for python~), everything works as expected.

# Solution?

The first thing that came to my mind was to reuse the tagname being passed in. When constructing links, use a sanitized version of the original tagname string. The current functionality appears to construct the URL using the tags which resulted from the search. Using the original tagname string would result in a URL like this one (shown below), when clicking on featured under django~.

https://stackoverflow.com/questions/tagged?tagnames=django~&sort=featured

• +1 for explicit steps to reproduce. – Pollyanna Jan 29 '10 at 20:28

• I have to agree, the list of tags matched by django~ is quite excessive, but I think the issue is easily solved without resorting to disallowing a search. Also, look at this from the vantage point of Stack Exchange, where a client may have a search resulting in only 20 tags, but each one is 100 characters long (as excessive as this may be). – Jack M. Jan 29 '10 at 20:43