Added HandleContext to re-enter soft-rewritten Requests. #709
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dear gin committers, thanks for your great and awesome work. Unfortunately i've hit a corner case to which i didn't find a sufficient solution and would like to share my fix with the community.
We are rewriting a large pile of fu^Wold PHP Code from a project i just was put upon. The problem being that this is highly SEO-crap-stuff that the URLs that have been used in the past, need to work exactly like they are, because they have been pimped, yadda yadda blah.
Anyway, i could not convince them that using a better URL Scheme with 3xx would be probably better. So technically the problem is that they have URLs with multiple parameters within one /-segment. Imagine /:categoryName-at-:city . Now since i have all the categories and cities in the database, i tried adding them all, but that didnt work out to well as it took a few hours to load all categories for all the cities. Now i hot-fixed it to be /:category/at/:city and rewrite my Request in the NotFoundHandler and stick it back into gin with .HandleContext.
Hope this either gets merged or helps someone else.