Skip to content

doc: update context for ngx.req.http_version and ngx.req.raw_header to include log_by_lua#2494

Open
tzssangglass wants to merge 1 commit intoopenresty:masterfrom
tzssangglass:raw_header_in_log_phase
Open

doc: update context for ngx.req.http_version and ngx.req.raw_header to include log_by_lua#2494
tzssangglass wants to merge 1 commit intoopenresty:masterfrom
tzssangglass:raw_header_in_log_phase

Conversation

@tzssangglass
Copy link
Copy Markdown
Contributor

And add test cases to cover.

I hereby granted the copyright of the changes in this pull request
to the authors of this lua-nginx-module project.

…_header to include log_by_lua

test(req-raw-header): add test case for log_by_lua to verify http_version and raw_header functionality
Copilot AI review requested due to automatic review settings April 23, 2026 13:24
@tzssangglass tzssangglass changed the title docs(README): update context for ngx.req.http_version and ngx.req.raw_header to include log_by_lua doc: update context for ngx.req.http_version and ngx.req.raw_header to include log_by_lua Apr 23, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the documentation and tests to reflect that ngx.req.http_version() and ngx.req.raw_header() are also available in the log_by_lua* context.

Changes:

  • Document log_by_lua* as a supported context for ngx.req.http_version and ngx.req.raw_header.
  • Add a regression test asserting both APIs work in log_by_lua_block and emit expected log output.
  • Update the test plan count to account for the new test’s additional error_log assertions.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
t/104-req-raw-header.t Adds a new log_by_lua test coverage for ngx.req.http_version() and ngx.req.raw_header() and adjusts planned test count accordingly.
README.markdown Updates API context documentation to include log_by_lua* for ngx.req.http_version and ngx.req.raw_header.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Successfully merging this pull request may close these issues.

2 participants