Commit Graph

677 Commits

Author SHA1 Message Date
5219c5c37e add ut cases for command gen dao (#2958) 2023-09-12 22:00:35 +08:00
1582714325 improve signal listening for package grpcx/ghttp/gproc (#2942) 2023-09-11 10:15:08 +08:00
7391a4d45a improve trace span generating for package gctx and http tracing content for package ghttp (#2937) 2023-09-11 10:14:00 +08:00
7e16d9b63e fix codes due to static codes analysis (#2935) 2023-09-07 20:22:20 +08:00
53323f3cf9 improve support for generic router registering (#2877) 2023-08-17 21:16:19 +08:00
3df5969348 fix generic check with slice for ghttp (#2850) 2023-08-16 21:42:36 +08:00
ea6a773d60 fix: marked gcode.CodeInternalPanic for panic (#2860) 2023-08-14 09:53:13 +08:00
35a326e169 fix(ghttp): fix access log info format (#2853) 2023-08-10 22:12:10 +08:00
f3437dc00f add generic support for http routes registering #2227 #2457 (#2807) 2023-08-02 20:35:58 +08:00
53e5a04073 change minimum golang version from v1.15 to v1.18 (#2820) 2023-08-01 21:15:28 +08:00
dec66dbd05 add NeverDone function for package gctx that creates and returns a never done ctx (#2784) 2023-07-25 20:45:34 +08:00
cb44c40a9c fix issue #2482 (#2789) 2023-07-25 20:28:50 +08:00
d72997da04 fix g.Wait not support OS Signal #2752 (#2768) 2023-07-19 20:06:06 +08:00
41c0dde9bf add complicated map with custom type converting support for package gconv (#2769) 2023-07-17 10:06:06 +08:00
4fc24e1391 add endpoints configuration for ghttp.Server (#2741) 2023-07-06 21:29:33 +08:00
6eb0de42f8 update context of the original http request (#2717) 2023-06-28 21:04:49 +08:00
a4762d0e02 fix issue in http proxy when repeatable reading request body content (#2666) 2023-05-25 11:56:12 +08:00
2329622564 add multiple methods support for united routes registering (#2664) 2023-05-25 10:58:06 +08:00
368312c816 add multiple methods support for object route (#2663) 2023-05-24 17:21:28 +08:00
4c6ebe7808 http context never done (#2602) 2023-04-26 20:20:47 +08:00
a9090e4a72 fix some comments (#2600)
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-04-26 19:34:22 +08:00
9171585b2c improve auto retrieving of ip addresses for service registering (#2593) 2023-04-23 21:58:17 +08:00
7ff7de4643 inherit context from http.Request for ghttp.Request (#2550) 2023-04-12 11:54:06 +08:00
1aa9f2809e improve stream response for http (#2564) 2023-04-12 10:12:11 +08:00
12e9febe9e fix issue #2516 (#2531)
* fix issue #2516

* golang ci configuration updates

* add example for default value of http request
2023-03-22 20:14:57 +08:00
XG
3a8fc1e70d optimize the handling of the SIGUSR1 signal (#2532)
optimize the handling of the SIGUSR1 signal
2023-03-21 21:26:49 +08:00
dfb7f5abfb improve error message when the router hander definition is not standrad (#2528) 2023-03-20 09:51:43 +08:00
45e4c9e16c add tag value of in support for api definition that has meta info (#2450) 2023-03-13 19:29:30 +08:00
XG
8c07f1a42c feat: support graceful shutdown (#2469) (#2475) 2023-03-13 19:21:56 +08:00
1cd1449085 add package contrib/rpc/grpcx (#2169) 2023-03-08 14:12:51 +08:00
8dc8dd9756 fix issue #2261 (#2458) 2023-02-20 21:57:49 +08:00
ad737ded3c fix issue #2447 (#2448) 2023-02-15 14:13:32 +08:00
ae4f14c2e2 add LevelPrint configuration for glog.Logger; add package internal/instance for grouped instance management feature; add default logger for panic message printing if no logger set in gcron.Cron (#2388)
* improve logging feature, add LevelPrint configuration for glog.Logger; add package internal/instance

* improve command build

* add default logger for panic message printing if no logger set

* up

* fix scheduler when timer triggers in less than one second for package gcron

* up
2023-01-06 14:15:30 +08:00
85c4794ceb fix BuildParams with urlEncode when len(v) <= 6 (#2308)
* fix: check urlEncode when len(v) <= 6

* fix BuildParams with urlEncode when len(v) <= 6

* fix BuildParams with urlEncode when len(v) <= 6

Co-authored-by: Prime Xiao <primexiao.dev@gmail.com>
2022-12-23 10:33:28 +08:00
74e968e93b fix: ghttp server static path config (#2335) 2022-12-22 17:21:33 +08:00
a853984f52 fix issue #2334 when accessing static files with cache time (#2366)
* Solve the problem of error when accessing static files with cache time.
Error message:
2022-11-29 19:40:11.090 [ERRO] http: superfluous response.WriteHeader call from github.com/gogf/gf/v2/net/ghttp.(*ResponseWriter).Flush (ghttp_response_writer.go:58)
Stack:

Verification method:
curl 'http://127.0.0.1:8000/' -H 'If-Modified-Since: Thu, 08 Dec 2022 03:13:55 GMT' --compressed

* Solve the problem of error when accessing static files with cache time.
Error message:
2022-11-29 19:40:11.090 [ERRO] http: superfluous response.WriteHeader call from github.com/gogf/gf/v2/net/ghttp.(*ResponseWriter).Flush (ghttp_response_writer.go:58)
Stack:

Verification method:
curl 'http://127.0.0.1:8000/' -H 'If-Modified-Since: Thu, 08 Dec 2022 03:13:55 GMT' --compressed

* Solve the problem of error when accessing static files with cache time.
Error message:
2022-11-29 19:40:11.090 [ERRO] http: superfluous response.WriteHeader call from github.com/gogf/gf/v2/net/ghttp.(*ResponseWriter).Flush (ghttp_response_writer.go:58)
Stack:

Verification method:
curl 'http://127.0.0.1:8000/' -H 'If-Modified-Since: Thu, 08 Dec 2022 03:13:55 GMT' --compressed

* fix issue #2334 when accessing static files with cache time

* up

Co-authored-by: 曾洪亮 <hongliang.zeng@i-soft.com.cn>
Co-authored-by: houseme <housemecn@gmail.com>
2022-12-22 10:25:30 +08:00
00c544ee99 fix issue when only one file was uploaded in batch receiver attribute (#2365)
* fix fixed An error occurred when only one file was uploaded in batches and add unit testing(#2092)

* fix issue uploading files for ghttp.Server

Co-authored-by: yxh <yxh1103@qq.com>
2022-12-21 10:38:19 +08:00
b0c9c68c9c add ut cases for package ghttp_request (#2351)
* add ut cases for package ghttp_middleware

* add ut cases for package ghttp_request

* add ut cases for package ghttp_request

* add ut cases for package ghttp_request

* add ut cases for package ghttp_request - form

* add ut cases for package ghttp_request - query

* add ut cases for package ghttp_request - request

* add ut cases for package ghttp_request - router
2022-12-12 10:28:58 +08:00
1030434ce6 add ut cases for package ghttp_response (#2352)
* add ut cases for package ghttp_response

* add ut cases for package ghttp_response

* add ut cases for package ghttp_response
2022-12-12 10:28:35 +08:00
2f08c4b00f add ut cases for package ghttp_middleware and ghttp_request (#2344)
* add ut cases for package ghttp_middleware

* add ut cases for package ghttp_request

* add ut cases for package ghttp_request
2022-12-07 20:02:46 +08:00
9402cc8c6a fix /* router supported for handler of package ghttp; fix json tag name issue when it contains , for package goai; add proxy example for http server (#2294)
* fix  router supported for handler of package ghttp; fix json tag name issue when it contains  for package goai

* add proxy example for http server
2022-11-14 19:57:39 +08:00
8c71d579b5 add command fix and up (#2280) 2022-11-10 19:56:12 +08:00
ee58255418 move common used tag from packages to package gtag for maintainability (#2256)
* move common used tag from packages to package gtag for maintainability

* move common used tag from packages to package gtag for maintainability

Co-authored-by: houseme <housemecn@gmail.com>
2022-11-07 17:51:37 +08:00
60d8283971 fix router parameters handling by auto url decoding (#2262)
improve router parameters handling by auto url decoding
2022-11-04 15:03:27 +08:00
63c3e8396b attach and export real handler for request (#2220)
* attach and export real handler for request

* add note

* rename HandlerParsedItem to HandlerItemParsed

Co-authored-by: John Guo <john@johng.cn>
2022-11-01 20:17:59 +08:00
1793bf0863 add golangci feature to guarantee codes quality (#2229) 2022-11-01 20:12:21 +08:00
33fdde6afd opt: parameter verification of optimized handler methods (#2224) 2022-10-20 19:36:01 +08:00
ee6103418b auto creating error with code in ghttp.MiddlewareHandlerResponse when there's no 200 http status code (#2223) 2022-10-20 15:50:17 +08:00
b617d399b6 fix info content when listens on port :0 for ghttp.Server (#2191) 2022-10-11 19:20:39 +08:00
b1611fee1b improve port listening for ghttp.Server (#2175)
* version updates

* fix issue #2172

* improve port listening for ghttp.Server

* UT cases update

* UT cases update

* add GetListenedPort/GetListenedAddress for gtcp.Server

* UT cases update for package gudp

* up
2022-10-08 21:45:21 +08:00