Completes code comment for redirect configs#4131
Conversation
| //# 1. number_of_redirections: The maximum number of redirections TS permits. Disabled if set to 0 (default) | ||
| //# 2. proxy.config.http.redirect_use_orig_cache_key: Location Header if set to 0 (default), else use original request cache key | ||
| //# 3. post_copy_size: The maximum POST data size TS permits to copy | ||
| //# 3. redirection_host_no_port: do not include default port in host header during redirection |
There was a problem hiding this comment.
Note to reviewers: This text was taken from HttpConfig.cc.
|
Shouldn't we remove either of them? Keeping two leaves a risk of inconsistency. I'd rather refer one from the other. |
@maskit I want to be sure I understand. I am adding what looks like a missing code comment and renumbering the sequence. It seemed to me that a new config variable was added at some point in the past, but the code comment for this config was not added above the group of definitions. This is adding the missing code comment and renumbering the sequence so it corresponds to the definitions, in the order that their declarations appear. Here is the complete section after the proposed change: //#
//# Redirection
//#
//# 1. number_of_redirections: The maximum number of redirections TS permits. Disabled if set to 0 (default)
//# 2. proxy.config.http.redirect_use_orig_cache_key: Location Header if set to 0 (default), else use original request cache key
//# 3. redirection_host_no_port: do not include default port in host header during redirection
//# 4. post_copy_size: The maximum POST data size TS permits to copy
//#
//##############################################################################
{RECT_CONFIG, "proxy.config.http.number_of_redirections", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
,
{RECT_CONFIG, "proxy.config.http.redirect_use_orig_cache_key", RECD_INT, "0", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
,
{RECT_CONFIG, "proxy.config.http.redirect_host_no_port", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
,
{RECT_CONFIG, "proxy.config.http.post_copy_size", RECD_INT, "2048", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
,Are you saying we should remove some of the code comments here? |
Yes, if the two comment blocks are exactly the same. |
Ah I see! From what I remember, they are not exactly the same, but I agree we should not duplicate comments unnecessarily. Let me check on it. |
34ccd82 to
7e0bece
Compare
|
@maskit @SolidWallOfCode
|
While looking into other changes planned for the 8.x release, I found a simple inconsistency in a code comment.
I wanted to fix this in a separate PR first, so that if something happens to other unrelated changes, this simple correction can remain separate. That is why it is requested to be back-ported to 8.x.