@@ -29,13 +29,13 @@ func newFunctionURLRequest() events.LambdaFunctionURLRequest {
2929 Authorizer : nil ,
3030 APIID : "0dhg9709da0dhg9709da0dhg9709da" ,
3131 DomainName : "0dhg9709da0dhg9709da0dhg9709da.lambda-url.eu-central-1.on.aws" ,
32- DomainPrefix : "" ,
32+ DomainPrefix : "0dhg9709da0dhg9709da0dhg9709da " ,
3333 Time : "" ,
3434 TimeEpoch : 0 ,
3535 HTTP : events.LambdaFunctionURLRequestContextHTTPDescription {
3636 Method : "POST" ,
3737 Path : "/example" ,
38- Protocol : "" ,
38+ Protocol : "HTTP/1.1 " ,
3939 SourceIP : "127.0.0.1" ,
4040 UserAgent : "Go-http-client/1.1" ,
4141 },
@@ -95,7 +95,7 @@ func newFiberAdapter() handler.AdapterFunc {
9595 result := make (map [string ]string )
9696 result ["Method" ] = ctx .Method ()
9797 result ["URL" ] = ctx .Request ().URI ().String ()
98- result ["RemoteAddr" ] = ctx .IP ()
98+ result ["RemoteAddr" ] = ctx .IP () + ":http" // fiber uses net.ResolveTCPAddr which resolves :http to :80
9999 result ["Body" ] = string (ctx .Body ())
100100
101101 return ctx .JSON (result )
@@ -108,6 +108,7 @@ func TestFunctionURLGET(t *testing.T) {
108108 adapters := map [string ]handler.AdapterFunc {
109109 "vanilla" : newVanillaAdapter (),
110110 "echo" : newEchoAdapter (),
111+ "fiber" : newFiberAdapter (),
111112 }
112113
113114 for name , a := range adapters {
@@ -143,6 +144,8 @@ func TestFunctionURLGET(t *testing.T) {
143144 }
144145
145146 if ! reflect .DeepEqual (body , expectedBody ) {
147+ t .Logf ("expected: %v" , expectedBody )
148+ t .Logf ("actual: %v" , body )
146149 t .Error ("request/response didnt match" )
147150 }
148151 })
0 commit comments