Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request:read_body_as_string() fails if body was buffered to a temporary file with nginx #784

Open
jprjr opened this issue Apr 24, 2024 · 0 comments

Comments

@jprjr
Copy link

jprjr commented Apr 24, 2024

Hi there - I noticed that if a larger request is buffered to a file, read_body_as_string doesn't return any data.

The lapis request object appears to only call ngx.req.get_body_data() which will return nil if the request was buffered to disk. In the OpenResty docs they recommend trying ngx.req.get_body_data(), then falling back to ngx.req.get_body_file()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant