Commit Graph

13 Commits

Author SHA1 Message Date
James Pettyjohn e9f187f60a removed use of sync.pool from HandleContext and added test coverage (#1565)
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.
2018-10-01 10:49:39 +08:00
Boris Borshevsky 6f94fd05c9 Linting and optimizing struct memory signature. (#1184)
* fix cleanPath spell (#969)

* linter and optimize structs
2017-11-29 10:50:14 +08:00
Bo-Yi Wu 1e1e4fc867 Add Makefile to check the following thing (#947)
* Add Makefile to check the following thing.

* vet check
* fmt check
* embedmd check
* misspell check

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* remove unused variable.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-12 21:50:42 -05:00
田欧 4ad3baf44e Add license for some files (#940) 2017-06-12 01:04:52 -05:00
田欧 d922143bc5 lint code for import (#939) 2017-06-11 21:40:15 -05:00
Bo-Yi Wu b8be9df642 docs: add graceful-shutdown example for go 1.8 (#835)
* docs: add graceful-shutdown example for go 1.8

* fix testing

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-03-16 10:38:30 -05:00
bigwheel 3a040f8550 Add integration test using httptest 2016-02-24 02:44:52 +09:00
Manu Mtz-Almeida 704d690ac0 Removes debug code in unit tests 2015-08-16 18:39:41 +02:00
Manu Mtz-Almeida ce2201c392 router.Run() can be called without parameters. #405 2015-08-16 16:19:51 +02:00
Manu Mtz-Almeida 21979d6a99 Completes integration test 2015-06-03 05:25:50 +02:00
Kevin Mulvey b235d14ca1 compare the byte array 2015-06-02 20:52:33 -04:00
Kevin Mulvey da5be64c9f test standard router 2015-05-31 17:50:26 -04:00
Kevin Mulvey b512566acf unix socket integration test 2015-05-31 17:50:26 -04:00