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

feature: add bypass_if_checks method to ngx.resp #495

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tzssangglass
Copy link

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

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

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

Signed-off-by: tzssangglass <[email protected]>
@tzssangglass
Copy link
Author

sister PR: openresty/lua-nginx-module#2401

if not r then
error("no request found")
end
return C.ngx_http_lua_ffi_bypass_if_checks(r)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we do not need any return value here.

Copy link
Member

Choose a reason for hiding this comment

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

@@ -87,6 +88,14 @@ status with an optional reason. The `reason` should be a string.

[Back to TOC](#table-of-contents)

bypass_if_checks
------------------
**syntax:** *ngx_resp.bypass_if_checks()*
Copy link
Member

Choose a reason for hiding this comment

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

Need a blank line after it. And don't forget to add the [Back to TOC](#table-of-contents)

Bypasses the conditional header checks as defined in RFC 9110 for the current request.
This method is useful when you need to skip validation of headers such as `If-Modified-Since`,
`If-None-Match`, `If-Range`, `If-Unmodified-Since`, and `If-Match`, allowing the response to
proceed without evaluating these conditions.
Copy link
Member

Choose a reason for hiding this comment

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

What about also writing down the Why? When people have to call this method?

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.

3 participants