As per #1230 there is an issue when using HandleContext where the context of the request is returned to the context sync.Pool before the parent request has finished, causing context to be used in a non-thread safe manner.
I've removed the bug by not entering the context back in the pool and leaving that to ServeHTTP.
There was no test coverage for this function so I've also added the test to cover it. As the bug only happens when there are concurrent requests, the tests issues hundreds of concurrent requests. Without the bug fixed the tests do consistently recreate the error.
* docs: add changelog for v1.3.0, update authors and version const
* add link for every referenced pull request (#1481)
* docs: add changelog for v1.3.0, update authors and version const
* add link for pr
Reference this issue #1323
1. There isn't any eg about `HandleContext`
2. The `c.Request.Path` of `HandleContext` Comment is not right
Based on the above two points, I pull this request.
If you think it's unnecessary, I will close this.
Thx.
* Revert "Merge pull request #753 from gin-gonic/bug"
This reverts commit 556287ff0856a5ad1f9a1b493c188cabeceba929, reversing
changes made to 32cab500ecc71d2975f5699c8a65c6debb29cfbe.
* Revert "Merge pull request #744 from aviddiviner/logger-fix"
This reverts commit c3bfd69303d0fdaf2d43a7ff07cc8ee45ec7bb3f, reversing
changes made to 9177f01c2843b91820780197f521ba48554b9df3.
* add custom Delims support
* add some test for Delims
* remove the empty line for import native package
* remove unuseful comments
Which is not likely the desired behavior.
RedirectTrailingSlash setting is meant to cause a redirect, but the code is never called because the setting wasn't being checked. Instead RedirectFixedPath was being checked.