awslabs / aws-lambda-go-api-proxy

lambda-go-api-proxy makes it easy to port APIs written with Go frameworks such as Gin (https://gin-gonic.github.io/gin/ ) to AWS Lambda and Amazon API Gateway.
Apache License 2.0
1.04k stars 197 forks source link

[fiber] Ensure content-type is set #95

Closed greeeg closed 3 years ago

greeeg commented 3 years ago

Issue

https://github.com/gofiber/fiber/issues/1223

Description of changes

This PR fixes an issue where POST requests made to a lambda which uses the Fiber adapter were not interpreted correctly.

Indeed, the content-type header from the source events.APIGatewayProxyRequest object was not mapped to the fasthttp.Request object, making Fiber context method c.FormFile() fail, as it internally uses this header to check if the request is a multipart form request.

The issue can be reproduced locally using AWS SAM along with the code in the original issue.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

drakejin commented 3 years ago

@greeeg Hi, It's a same issue https://github.com/awslabs/aws-lambda-go-api-proxy/pull/89.. Now, I'm doing it.

greeeg commented 3 years ago

@drakejin Yes, closing this one now :)