Commit Graph

234 Commits

Author SHA1 Message Date
Kevin Wan
4211672bfd
chore: add more tests (#3577) 2023-09-20 00:01:26 +08:00
Awadabang
cc21f5fae2
update: limit logBrief http body size (#3498)
Co-authored-by: 常公征 <changgz@yealink.com>
2023-09-16 11:58:21 +00:00
Kevin Wan
cb3ffc76a3
fix: #3478 (#3493) 2023-08-14 14:22:22 +00:00
Kevin Wan
13cdbdc98b
chore: avoid nested WithCodeResponseWriter (#3406) 2023-07-11 15:59:43 +00:00
cong
61e562d0c7
refactor(rest): keep rest log collector context key private (#3407) 2023-07-10 01:52:26 +00:00
Kevin Wan
31b9ba19a2
chore: refactor httpx.TimeoutHandler (#3400) 2023-07-09 07:04:59 +00:00
扶桑花间
916cea858f
1. Fix w. (http. Flusher). Flush() error (#3388) 2023-07-05 15:27:15 +00:00
Kevin Wan
40e7a4cd07
chore: refactor httpx.SetOkHandler (#3373) 2023-06-26 00:27:26 +08:00
Kevin Wan
f998803131
chore: refactor and add more tests (#3351) 2023-06-16 01:04:58 +08:00
TaoYu
1262266ac2
feat: httpx add common handler (#3269) 2023-06-15 15:31:15 +00:00
Kevin Wan
8a4cc4f98d
chore: add more tests (#3299) 2023-05-29 23:44:36 +08:00
me-cs
0217044900
update:Use the Milliseconds method of duration to get the number of milliseconds (#3285)
Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
2023-05-26 14:32:46 +00:00
SleeplessBot
a93c24ce84
Add method label for prometheus middleware metrics (#3226)
Co-authored-by: 蓝益尤 <lan.yiyou@intellif.com>
2023-05-08 12:59:20 +00:00
Kevin Wan
9f42eda9ff
fix: timeout handler not implementing http.Flusher (#3225) 2023-05-08 18:07:02 +08:00
Kevin Wan
8ffe4c01d1
chore: use logx.Must instead of log.Fatal (#3189) 2023-04-29 23:46:04 +08:00
Kevin Wan
14caf5c799
chore: simplify tests with logtest (#3184) 2023-04-29 20:36:29 +08:00
Kevin Wan
7568674b2b
chore: use %q instead of %s for unmarshaling (#3163) 2023-04-24 12:11:12 +08:00
Kevin Wan
3da740b7fc
chore: remove unnecessary code (#3161) 2023-04-23 22:58:22 +08:00
chen quan
ce4eb6ed61
fix: fixed #2945 (#2953)
Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
2023-04-23 14:22:03 +00:00
cong
22fad4bb9c
feat(trace): add trace test helpers (#3108) 2023-04-08 14:52:25 +00:00
Kevin Wan
8d0cceb80c
chore: add more tests (#3084) 2023-03-31 22:33:43 +08:00
heyehang
e06abf4f6f
fixbug:superfluous response.WriteHeader (#3083) 2023-03-31 13:05:29 +00:00
Kevin Wan
6170d7b790
feat: rest validation on http requests (#3041) 2023-03-19 12:04:18 +00:00
Kevin Wan
60a13f1e53
chore: add more tests (#3018) 2023-03-12 20:42:50 +08:00
sniperwzq
3e093bf34e
defines the method to customize http server (#2171) 2023-03-11 23:15:00 +08:00
Kevin Wan
211b9498ef
chore: add more tests (#3016) 2023-03-11 22:22:39 +08:00
Kevin Wan
0d5a68869d
fix: gateway conf doesn't work (#2968) 2023-03-05 22:19:58 +08:00
Kevin Wan
d9d79e930d
Merge pull request from GHSA-fgxv-gw55-r5fq
* fix: Authorization Bypass Through User-Controlled Key

* chore: add not safe domain test
2023-03-04 23:34:11 +08:00
yangjinheng
dbc8f9faca timeout writer add hijack 2023-03-04 11:50:04 +00:00
yangjinheng
96998ae570 Update timeouthandler.go 2023-03-04 11:50:04 +00:00
Kevin Wan
66be213346
chore: refine rest validator (#2928)
* chore: refine rest validator

* chore: add more tests

* chore: reformat code

* chore: add comments
2023-02-26 21:58:58 +08:00
Qiying Wang
92c8899f47
feat: add configurable validator for httpx.Parse (#2923)
Co-authored-by: qiying.wang <qiying.wang@highlight.mobi>
2023-02-26 20:40:22 +08:00
Kevin Wan
238c830f17
fix: timeout not working if greater than global rest timeout (#2926) 2023-02-26 20:22:20 +08:00
chenquan
3bc40d9eaf fix: fixed the bug that old trace instances may be fetched 2023-02-22 13:01:22 +00:00
Kevin Wan
ae87114282
chore: change interface{} to any (#2818)
* chore: change interface{} to any

* chore: update goctl version to 1.5.0

* chore: update goctl deps
2023-01-24 16:32:02 +08:00
Kevin Wan
696da4efee
chore: add more tests (#2815)
* chore: add more tests

* chore: add more tests

* chore: add more tests

* chore: add more tests

* chore: add more tests

* chore: add more tests
2023-01-24 13:43:13 +08:00
Kevin Wan
4d7fa08b0b
feat: support **struct in mapping (#2784)
* feat: support **struct in mapping

* chore: fix test failure
2023-01-12 20:45:32 +08:00
Kevin Wan
367afb544c
feat: support ptr of ptr of ... in mapping (#2779)
* feat: support ptr of ptr of ... in mapping

* feat: support ptr of ptr of time.Duration in mapping

* feat: support ptr of ptr of json.Number in mapping

* chore: improve setting in mapping

* feat: support ptr of ptr encoding.TextUnmarshaler in mapping

* chore: add more tests

* fix: string ptr

* chore: update tests
2023-01-12 15:56:51 +08:00
cong
43b8c7f641
chore(trace): improve rest tracinghandler (#2783) 2023-01-12 12:50:57 +08:00
cong
f9619328f2
refactor(rest): use static config for trace ignore paths. (#2773) 2023-01-12 09:40:18 +08:00
Kevin Wan
ade6f9ee46
feat: add middlewares config for rest (#2765)
* feat: add middlewares config for rest

* chore: disable logs in tests

* chore: enable verbose in tests
2023-01-08 16:41:53 +08:00
chen quan
dc260f196a
refactor: simplify the code (#2763)
* refactor: simplify the code

* fix: fix data race

* refactor: simplify the code

* refactor: simplify the code
2023-01-07 13:32:56 +08:00
chen quan
fc9b3ffdc1
refactor: use opentelemetry's standard api to track http status code (#2760) 2023-01-06 23:27:54 +08:00
chen quan
21c49009c0
chore: remove unnecessary code (#2754) 2023-01-05 22:12:07 +08:00
Kevin Wan
83f88d177f
chore: improve codecov (#2752) 2023-01-04 13:42:20 +08:00
xiang
641ebf1667
feat: trace http.status_code (#2708)
* feat: trace http.status_code

* feat: implements http.Flusher & http.Hijacker for traceResponseWriter

* test: delete notTracingSpans after test

* feat: trace http.status_code

* feat: implements http.Flusher & http.Hijacker for traceResponseWriter

* test: delete notTracingSpans after test

* refactor: update trace handler span message

* fix: code conflict
2023-01-04 10:21:57 +08:00
Kevin Wan
dd294e8cd6
fix: #2700, timeout not enough for writing responses (#2738)
* fix: #2700, timeout not enough for writing responses

* fix: test fail

* chore: add comments
2023-01-02 13:51:15 +08:00
JackSon_tm.m
3e9d0161bc
add ServeHTTP to Server/Engin for doing Httptest (#2704) 2023-01-02 00:24:58 +08:00
Kevin Wan
cf6c349118
fix: #2735 (#2736)
* fix: #2735

* chore: make error consistent
2023-01-01 12:21:53 +08:00
Kevin Wan
7a75dce465
refactor: remove duplicated code (#2705) 2022-12-14 23:36:56 +08:00