openresty / openresty/echo-nginx-module

Cannot post large body.

Open
#67 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.2k
Forks
251
Avg merge
1h 24m
Merged PRs (30d)
2

Description

I found that echo-module cannot print nginx log when I post a large body,(not so large, such as more than 20K);

Everything works fine if I post a client body smaller than 1kb, there are good Nginx logs.
It doesn't work If client body size is more than several TEN KB bytes. the client body is '-' in the Nginx log.

I've added 'echo_read_request_body;' in the location to avoid an empty $request_body because Nginx may save client body to a temp file;
I've configured following in my Nginx.conf:

client_max_body_size 1024M;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with echo-nginx-module and the provided Nginx settings, comparing requests below 1 KB with bodies larger than several tens of KB. Trace how large request bodies are handled after echo_read_request_body; done means the client body is present in Nginx logs for large requests as well as small ones.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, nginx
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.