Skip to content

fix: optimize s3 module string constants#240

Merged
szbr9486 merged 1 commit intoCurvineIO:mainfrom
jlon:s3_gw
Sep 8, 2025
Merged

fix: optimize s3 module string constants#240
szbr9486 merged 1 commit intoCurvineIO:mainfrom
jlon:s3_gw

Conversation

@jlon
Copy link
Copy Markdown
Contributor

@jlon jlon commented Sep 3, 2025

Comprehensive string constant optimization across curvine-s3-gateway:

  • Create utils/consts.rs with 60+ string constants
  • Optimize S3 API constants (storage classes, content types, metadata keys)
  • Optimize HTTP constants (query parameters, headers, paths)
  • Optimize auth constants (AWS signatures, headers, error messages)
  • Optimize error handling constants (error display messages)
  • Replace 100+ hardcoded strings with named constants
  • Improve code maintainability and reduce magic strings
  • All optimizations compile without warnings
  • Maintain 100% functional compatibility

Files modified:

  • utils/: consts.rs (new), mod.rs, s3_utils.rs
  • auth/: sig_v4.rs
  • http/: router.rs, axum.rs
  • s3/: s3_api.rs, error.rs, types.rs
  • lib.rs (root module)

@jlon jlon changed the title Optimize S3 module string constants optimize s3 module string constants Sep 4, 2025
@jlon jlon changed the title optimize s3 module string constants fix: optimize s3 module string constants Sep 4, 2025
@jlon jlon force-pushed the s3_gw branch 4 times, most recently from 5c5c06c to 7a52349 Compare September 8, 2025 06:34
@szbr9486 szbr9486 merged commit 17cb555 into CurvineIO:main Sep 8, 2025
3 checks passed
@lzjqsdd lzjqsdd added the bug Something isn't working label Sep 22, 2025
@jlon jlon deleted the s3_gw branch October 9, 2025 02:51
Coderlxl pushed a commit to Coderlxl/curvine that referenced this pull request Dec 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants