You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/02/11 21:32:48 UTC
[GitHub] [trafficserver] ywkaras opened a new pull request #7519: Change cookie_remap plugin to allow use of pre-remap URL (and components).
ywkaras opened a new pull request #7519:
URL: https://github.com/apache/trafficserver/pull/7519
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] ywkaras removed a comment on pull request #7519: Change cookie_remap plugin to allow use of pre-remap URL (and components).
Posted by GitBox <gi...@apache.org>.
ywkaras removed a comment on pull request #7519:
URL: https://github.com/apache/trafficserver/pull/7519#issuecomment-778251540
[approve ci autest]
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] ywkaras commented on pull request #7519: Change cookie_remap plugin to allow use of pre-remap URL (and components).
Posted by GitBox <gi...@apache.org>.
ywkaras commented on pull request #7519:
URL: https://github.com/apache/trafficserver/pull/7519#issuecomment-778281074
The Au test that's breaking is also breaking on master.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] ywkaras merged pull request #7519: Change cookie_remap plugin to allow use of pre-remap URL (and components).
Posted by GitBox <gi...@apache.org>.
ywkaras merged pull request #7519:
URL: https://github.com/apache/trafficserver/pull/7519
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bneradt commented on pull request #7519: Change cookie_remap plugin to allow use of pre-remap URL (and components).
Posted by GitBox <gi...@apache.org>.
bneradt commented on pull request #7519:
URL: https://github.com/apache/trafficserver/pull/7519#issuecomment-779964631
[approve ci autest]
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] zwoop commented on pull request #7519: Change cookie_remap plugin to allow use of pre-remap URL (and components).
Posted by GitBox <gi...@apache.org>.
zwoop commented on pull request #7519:
URL: https://github.com/apache/trafficserver/pull/7519#issuecomment-800597138
Also cherry-picked to 9.0.x, since it's possible people need this to upgrade to 9.x.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] ywkaras commented on a change in pull request #7519: Change cookie_remap plugin to allow use of pre-remap URL (and components).
Posted by GitBox <gi...@apache.org>.
ywkaras commented on a change in pull request #7519:
URL: https://github.com/apache/trafficserver/pull/7519#discussion_r574894028
##########
File path: plugins/experimental/cookie_remap/cookie_remap.cc
##########
@@ -172,13 +240,25 @@ dec_to_hex(type _num, char *hdigits)
void
urlencode(std::string &str)
{
- size_t pos = 0;
- for (; pos < str.length(); pos++) {
- if (!isalnum(str[pos])) {
- char dec[2];
- dec_to_hex(str[pos], dec);
- std::string replacement = "%" + std::string(dec, 2);
- str.replace(pos, 1, replacement);
+ auto orig = str.size();
+ auto enc = orig;
+ for (auto c : str) {
+ if (!isalnum(c)) {
+ enc += 2;
+ }
+ }
+ if (enc == orig) {
+ // No changes needed.
+ return;
+ }
+ str.resize(enc);
+ while (orig--) {
+ if (!isalnum(str[orig])) {
+ enc -= 3;
+ dec_to_hex(str[orig], &(str[enc + 1]));
+ str[enc] = '%';
+ } else {
+ str[--enc] = str[orig];
Review comment:
I optimized this while I was in here, because it's potentially high frequency code. Not related to the main purpose of the PR.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] zwoop commented on pull request #7519: Change cookie_remap plugin to allow use of pre-remap URL (and components).
Posted by GitBox <gi...@apache.org>.
zwoop commented on pull request #7519:
URL: https://github.com/apache/trafficserver/pull/7519#issuecomment-800596663
Cherry-picked to v9.1.x branch.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] ywkaras commented on pull request #7519: Change cookie_remap plugin to allow use of pre-remap URL (and components).
Posted by GitBox <gi...@apache.org>.
ywkaras commented on pull request #7519:
URL: https://github.com/apache/trafficserver/pull/7519#issuecomment-778251540
[approve ci autest]
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org