mirror of
https://github.com/versity/versitygw.git
synced 2026-09-01 21:56:57 +00:00
fix: add Host header to HTTP test requests for fasthttp v1.70.0 compatibility
fasthttp v1.70.0 now enforces the HTTP/1.1 requirement of exactly one Host header, rejecting requests that omit it. Fix tests that were failing due to missing host.
This commit is contained in:
@@ -45,6 +45,7 @@ func TestApplyBucketCORS_FallbackOrigin_NoBucketCors_NoRequestOrigin(t *testing.
|
||||
if err != nil {
|
||||
t.Fatalf("new request: %v", err)
|
||||
}
|
||||
req.Host = "localhost"
|
||||
|
||||
resp, err := app.Test(req)
|
||||
if err != nil {
|
||||
@@ -80,6 +81,7 @@ func TestApplyBucketCORS_FallbackOrigin_NotAppliedWhenBucketCorsExists(t *testin
|
||||
if err != nil {
|
||||
t.Fatalf("new request: %v", err)
|
||||
}
|
||||
req.Host = "localhost"
|
||||
|
||||
resp, err := app.Test(req)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user