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

Trim white spaces before and after the equal sign #8638

Merged
merged 1 commit into from
Feb 8, 2022

Conversation

duke8253
Copy link
Contributor

@duke8253 duke8253 commented Jan 31, 2022

This fixes #7888

Also cleans up the code for trimming and squeezing spaces.

@duke8253 duke8253 added this to the 10.0.0 milestone Jan 31, 2022
@duke8253 duke8253 requested a review from bryancall as a code owner January 31, 2022 21:13
@duke8253 duke8253 self-assigned this Jan 31, 2022
@SolidWallOfCode
Copy link
Member

The original code is terrible, you should take this opportunity to fix it. Foremost, don't use stringstream. Why not something like

std::string out;
out.reserve(in.size());
size_t n = 0;
for ( char c : in ) {
  if (!isspace(c)) { out << c;  ++n; }
}
out.resize(n);
return out;

@duke8253 duke8253 force-pushed the master-s3_space branch 4 times, most recently from 50a8445 to c9b6f7a Compare February 1, 2022 21:23
@duke8253
Copy link
Contributor Author

duke8253 commented Feb 2, 2022

[approve ci]

@duke8253 duke8253 merged commit 8c5fb9c into apache:master Feb 8, 2022
SolidWallOfCode pushed a commit to SolidWallOfCode/trafficserver that referenced this pull request Feb 9, 2022
@zwoop
Copy link
Contributor

zwoop commented Jul 7, 2022

@duke8253 This PR seems to fix stuff added in #8579, which is not in 9.2.x. Do we really need this for 9.2.x?

zwoop pushed a commit that referenced this pull request Jul 7, 2022
@zwoop zwoop modified the milestones: 10.0.0, 9.2.0 Jul 7, 2022
@zwoop
Copy link
Contributor

zwoop commented Jul 7, 2022

Cherry-picked to v9.2.x, merged both of these fixes. @duke8253 let me know if this is not desirable for 9.2.x.

masaori335 pushed a commit to masaori335/trafficserver that referenced this pull request Feb 21, 2023
* asf/9.2.x:
  Updated ChangeLog
  trim white spaces before and after the equal sign (apache#8638)
  Fixes compacting spaces in S3 auth plugin (apache#8579)
  Fixed issues when compiling with -Og (apache#8665)
  Update lua plugin examples (apache#8646)
  Additional helper functions for request transform (apache#8631)
  Move ChangeLog and README.md to the lib/fastlz/ (apache#8629)
  Remove unused functions/definitions from ink_defs (apache#8714)
  Stop ATS when a global lua script fails to load (apache#8671)
  Change DNS retries to be a static (requires restart) config value (apache#8724)
  add log format for whether origin TLS connection resumed an existing TLS session (apache#8745)
  Update location for core rule set in modsecurity example (apache#8924)
  Remove unnecessary use of a memory arena when logging. (apache#8925)
  Add docs for remap_stats plugin (apache#8927)
  Allows errors from plugin initialization to bubble up (apache#8926)
  proxy_serve_stale: Test updates (apache#8928)
  Make clang-format not modify ink_autoconf.h.in and ink_autoconf.h (apache#8935)
  Fix clang-format installation with multiple threads (apache#8931)
  Add nullptr check of HTTPInfo (apache#8937)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

S3 auth plugin configuration parsing does not account for inner spaces
3 participants