proposed resolution of issue #611 #668
Open
+5
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
To fix #611, a small addition has been made to the
ngx_http_script_regex_start_code
function insrc/http/ngx_http_script.c
. This addition prevents thengx_http_script_copy_capture_code
function in the same file from performing an unnecessary URI escape that was the origin of the bug in the “test1” case, while continuing to perform an appropriate URI escape in the “test2” case. This addition does not affect the “test3” case, which did not demonstrate the bug because it involved no capture group.In running the nginx test suite on my system, many tests were skipped, and a failure was reported for
proxy_implicit.t
due to dying from “too many addresses in localhost”. Since my system’s/etc/hosts
file originally came with (and still has) three different lines forlocalhost
(specifying “127.0.0.1”, “::1”, and “fe80::1%lo0” respectively), I believe that the failure ofproxy_implicit.t
is due to the contents of its/etc/hosts
file rather than due to this proposed addition.If this proposed addition causes regressions on other systems that are capable of running all of the nginx test suite’s tests, I’d appreciate receiving feedback about it.