Vishal Rana
61da50fefc
Update test to expect improved Response.Flush error message
...
The test TestResponse_FlushPanics was expecting the old generic error
message but should now expect the improved message that includes the
specific ResponseWriter type information.
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-15 17:54:49 -07:00
Vishal Rana
a92f4209c6
Fix IP extraction fallback and improve Response.Flush error messages
...
Fixes two issues:
1. extractIP now handles RemoteAddr without port (#2757 )
- Previously returned empty string for addresses like "192.168.1.1"
- Now validates with net.ParseIP and returns the IP directly
- Maintains full backwards compatibility for existing behavior
2. Response.Flush uses modern error handling (#2789 )
- Replaces type assertion with http.NewResponseController
- Provides descriptive panic message with ResponseWriter type info
- Improves debugging experience when flushing is not supported
Both changes maintain full backwards compatibility while fixing edge cases.
Closes #2757
Closes #2789
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-15 17:52:30 -07:00
Martti T.
5ac2f11f21
Use Go 1.25 in CI ( #2810 )
...
* Use Go 1.25 in CI
* Disable test: in Go 1.24 and earlier http.NoBody would result ContentLength=-1 but as of Go 1.25 http.NoBody would result ContentLength=0 I am too lazy to bother documenting this as 2 version specific tests.
2025-08-29 17:53:06 +03:00
cui
9acf534182
refactor to use reflect.TypeFor ( #2812 )
2025-08-25 22:32:58 +03:00
Martti T.
8493c61ede
Update deps ( #2807 )
...
* Update golang.org/x/ dependencies
2025-08-12 11:57:52 +03:00
Martti T.
98ca08e7dd
Improve changelog for 4.13.4 ( #2783 )
v4.13.4
2025-05-22 14:18:29 +03:00
Martti T.
f24aaff49b
Revert "CORS: reject requests with 401 for non-preflight request with not mat…" ( #2782 )
...
This reverts commit ee3e129778 .
2025-05-22 14:11:54 +03:00
Martti T.
9f50a659e9
Changelog for 4.13.4 ( #2781 )
2025-05-22 14:04:26 +03:00
Martti T.
d735cb6a2e
Upgrade dependencies ( #2780 )
...
Fixed these:
* https://pkg.go.dev/vuln/GO-2025-3487 (affects: `golang.org/x/crypto/ssh`)
* https://pkg.go.dev/vuln/GO-2025-3503 (affects: `golang.org/x/net/http/httpproxy` and `golang.org/x/net/proxy` )
* https://pkg.go.dev/vuln/GO-2025-3595 (affects: `golang.org/x/net/html` )
2025-05-22 13:57:55 +03:00
t-ibayashi-safie
de44c53a5b
Add support for TLS WebSocket proxy ( #2762 )
...
* Add support for TLS WebSocket proxy
* support tls to non-tls and non-tls to tls websocket proxy
2025-04-04 11:01:42 +03:00
Martti T.
c44f6283f0
CI: test with Go 1.24 ( #2748 )
2025-02-12 19:17:34 +02:00
zhuhaicity
ce0b12ae53
chore: fix some typos in comment ( #2735 )
...
Signed-off-by: zhuhaicity <zhuhai@52it.net >
2025-01-12 09:28:38 +02:00
Martti T.
ee3e129778
CORS: reject requests with 401 for non-preflight request with not matching origin header ( #2732 )
2025-01-07 22:06:28 +02:00
Martti T.
45524e39d6
Update golang.org/x/net dependency [GO-2024-3333]( https://pkg.go.dev/vuln/GO-2024-3333 ) ( #2722 )
v4.13.3
2024-12-19 06:51:34 +02:00
Martti T.
692bc2abb6
Update dependencies (dependabot reports https://pkg.go.dev/vuln/GO-2024-3321 ) ( #2721 )
v4.13.2
2024-12-12 07:47:56 +02:00
Martti T.
fd3f07447e
Changelog for v4.13.1 ( #2719 )
v4.13.1
2024-12-11 12:18:50 +02:00
Masahiro Furudate
0368ed87f2
Add Conditions to Ensure Bind Succeeds with Transfer-Encoding: chunked ( #2717 )
...
* Add conditions to ensure Bind succeeds with `Transfer-Encoding: chunked`.
* Revert the ContentLength conditions for BindBody
2024-12-11 12:04:21 +02:00
Martti T.
3b017855b4
Changelog for 4.13.0 ( #2712 )
v4.13.0
2024-12-04 22:13:45 +02:00
Steven-Whitehead
fe26277781
remove jwt middleware
2024-11-25 22:21:56 +02:00
toimtoimtoim
9e73691837
Shorten Github issue template and add test example
2024-11-22 22:54:55 +02:00
toimtoimtoim
118c1632f2
CORS middleware should compile allowOrigin regexp at creation.
2024-11-22 11:59:58 +02:00
pham vinh dat
a973e3bc43
add unit-test
2024-11-22 11:58:56 +02:00
pham vinh dat
c4410fe0b8
fix(bind body): content-length can be -1
2024-11-22 11:58:56 +02:00
toimtoimtoim
5d98929328
Remove broken header
2024-11-18 21:56:43 +02:00
eolson
5a0b4dd806
clean up field assignments with default values to make test configuration more concise/readable
2024-10-26 15:44:47 +03:00
eolson
03c0236fb3
refactor basic_auth_test to utilize table driven tests
2024-10-26 15:44:47 +03:00
toimtoimtoim
822d11a465
Add TemplateRenderer struct to ease creating renderers for html/template and text/template packages.
2024-10-20 21:21:51 +03:00
toimtoimtoim
d5b32c6e47
Refactor work done by martinpasaribu <martin.yonathan305@gmail.com> (binding multipart files by using struct tags)
2024-10-20 21:03:50 +03:00
martinpasaribu
fb769d71b5
🎨 : add some test case for multipart file
2024-10-20 21:03:50 +03:00
martinpasaribu
d1ab8e8544
bind: add support of multipart multi files
2024-10-20 21:03:50 +03:00
martinpasaribu
ab87b63640
improve MultipartForm test
2024-10-06 23:53:23 +03:00
toimtoimtoim
d20a6257aa
Remove pre Go1.20 support
2024-08-16 09:16:52 +03:00
toimtoimtoim
27c55f2189
tests: In Go 1.23 fs related errors have changed.
2024-08-16 09:16:52 +03:00
toimtoimtoim
a5612d83d0
Add Go 1.23 to CI
2024-08-16 09:16:52 +03:00
Saloni Agarwal
f13e2640f0
bind: Maintain backwards compatibility for map[string]interface{} binding ( #2656 )
...
* bind: Maintain backwards compatibility for map[string]interface{} binding
* bind to single string for map[string]interface{}{}
2024-07-22 07:33:01 +03:00
Behnam
f7d9f5142e
optimization: struct alignment ( #2636 )
...
(#2632 )
2024-05-30 22:50:01 +03:00
Martti T
88c379ff77
Changelog for v4.12.0 ( #2626 )
v4.12.0
2024-04-15 21:31:01 +03:00
Martti T
e0f2a02e4c
proxy middleware should use http proxy for SSE requests ( #2624 )
2024-04-15 21:12:26 +03:00
Martti T
3062025405
Update golang.org/x/* deps ( #2625 )
2024-04-15 20:45:51 +03:00
Martti T
447c92d842
When route is registered with empty path it is normalized to /. Make sure that returned echo.Route structs reflect that behavior. ( #2616 )
2024-03-27 12:28:46 +02:00
Martti T
d549290448
Remove maxparam dependence from Context ( #2611 )
2024-03-21 23:42:16 +02:00
Martti T
011acb4732
default binder can bind pointer to slice as struct field. For example *[]string ( #2608 )
2024-03-13 22:07:08 +02:00
Martti T
c57fcb3746
Default binder can use UnmarshalParams(params []string) error interface to bind multiple input values at one go. ( #2607 )
2024-03-11 22:49:58 +02:00
Vladimir Buyanov
a3b0ba24d3
Fix Real IP logic ( #2550 )
...
* Fix realIP logic
2024-03-10 19:04:54 +02:00
Martti T
3598f295f9
Change type definition blocks to single declarations. This helps copy/pasting Echo code in examples. ( #2606 )
2024-03-09 07:53:07 -08:00
toimtoimtoim
5f7bedfb86
update makefile
2024-03-09 11:28:13 +02:00
toimtoimtoim
f0966790fb
Upgrade deps
2024-03-09 11:28:13 +02:00
Martti T
a842444e8f
Add SPDX licence comments to files. See https://spdx.dev/learn/handling-license-info/ ( #2604 )
2024-03-09 11:21:24 +02:00
Martti T
bc1e1904f1
Allow ResponseWriters to unwrap writers when flushing/hijacking ( #2595 )
...
* Allow ResponseWriters to unwrap writers when flushing/hijacking
2024-03-09 10:50:47 +02:00
pomadev
3e04e3e2f2
fix: some typos ( #2596 )
2024-03-06 21:52:53 +02:00