Commit Graph

28 Commits

Author SHA1 Message Date
thinkerou
4b68a5f12a
chore: update go.mod and remove space from copyright (#3158)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-28 10:42:28 +08:00
thinkerou
2bde107686
test support go1.18 (#2990) 2022-03-21 09:43:17 +08:00
Bo-Yi Wu
94153d1e19
test: expose performRequest func (#3012) 2022-01-02 19:07:44 +08:00
Eren A. Akyol
11aa11a656
fix readability in recovery test (#2797) 2021-07-27 07:59:53 +08:00
Johnny Dallas
4cabdd303f
Add CustomRecovery builtin middleware (#2322)
* Add CustomRecovery and CustomRecoveryWithWriter methods

* add CustomRecovery example to README

* add test for CustomRecovery

* support RecoveryWithWriter(io.Writer, ...RecoveryFunc)
2020-07-09 09:40:00 +08:00
Dan Markham
094f9a9105 v1.4.0 + #1631 (remove go1.6/go1,7 support) (#1851)
* remove go1.6 support

* remove build tag

* remove todo

* remove go1.6 support: https://github.com/gin-gonic/gin/pull/1383/commits

* update readme

* remove go1.7 support

* fix embedmd error

* test

* revert it

* revert it

* remove context_17

* add pusher test

* v1.4.0 rc1
2019-05-07 18:32:32 +08:00
Abhishek Chanda
f9de6049cb Remove contents of the Authorization header while dumping requests (#1836)
This PR replaces the contents of that header with a *. This prevents
credential leak in logs.
2019-04-18 10:45:37 +08:00
Dmitry Kutakov
31bbb10f34 Make silent debug info on tests (#1765)
* make silent log on tests

* fix coverage: check end-of-line at the end of debug msg
2019-02-18 10:10:45 +08:00
thinkerou
f463d847c2
chore: fix test fail (#1669)
* chore: fix test fail

* fix binduri test fail
2018-12-05 05:58:35 +08:00
thinkerou
7ec82ee894 recovery: fix issue about syscall import on google app engine (#1640)
* recovery: fix issue about syscall import on google app engine

* add ToLower()

* the whole error message
2018-11-22 09:17:44 +08:00
Justin Israel
37854ee10f Fix panic stack trace being printed during recovery of broken pipe (#1089) (#1259) 2018-11-06 13:40:20 +08:00
Dustin Decker
ad53619b15 Don't log requests (#1370)
Fixes #1331

HTTP logging leaks sensitive request information.

This PR removes HTTP request logging during panics.
2018-09-23 15:15:23 +08:00
田欧
f45c928a15 chore: use http.Status* instead of hard code (#1482) 2018-08-14 09:51:56 +08:00
田欧
1f1bc429ed chore: add test case for source/function of recovery.go (#1467) 2018-08-09 17:20:06 +08:00
田欧
eeb57848ca update assert param(expect, actual) position (#1177) 2017-11-21 21:18:45 +08:00
Roy Lou
4c4444b160 Write header immediately in AbortWithStatus()
Otherwise, caller needs to invoke WriteHeaderNow himself after
AbortWithStatus(), which is error-prone.

Also modified ErrorLoggerT() such that it always writes log to response
body. Otherwise calling AbortWithStatus() will fail to write body because
c.Writer.Written() is set true by WriteHeaderNow().
2016-04-15 00:02:29 +08:00
Manu Mtz.-Almeida
1183c1ca8f Fixed recovery unit tests 2016-01-26 19:28:41 +01:00
Manu Mtz-Almeida
9ecb76ef6e Cosmetic changes 2015-05-18 20:50:46 +02:00
Manu Mtz-Almeida
99694bb716 Fixes errors 2015-05-12 15:22:13 +02:00
Manu Mtz-Almeida
54b3decc21 More unit tests 2015-04-08 13:30:17 +02:00
Manu Mtz-Almeida
ac0ad2fed8 Improves unit tests 2015-04-08 02:58:35 +02:00
Manu Mtz-Almeida
3e3ced70d4 Using log.Panic instead 2015-03-23 05:50:10 +01:00
Manu Mtz-Almeida
615c62d736 Some cosmetic changes 2015-03-23 04:41:29 +01:00
Manu Mtz-Almeida
07a3961941 General refactoring 2014-10-08 21:37:26 +02:00
Manu Mtz-Almeida
8e5397bfa0 Adds in-code license 2014-08-29 19:49:50 +02:00
Manu Mtz-Almeida
d85245b5aa Improves unit tests
- Reusing much more code
- More coverage
- Cleanup
- Fixes some cases
2014-08-18 19:48:48 +02:00
Sasha Myasoedov
f2176c3100 Adjusted tests for recovery. 2014-08-11 13:38:30 +03:00
Sasha Myasoedov
fcd997e083 Added test for recovery 2014-08-08 15:50:52 +03:00