Xuanwo opened a new issue, #8876:
URL: https://github.com/apache/opendal/issues/8876

   ## Problems
   
   1. **`TosConfig::disable_config_load` is completely unimplemented (dead 
config field)**:
      - `core/services/tos/src/config.rs:86` publicly defines `pub 
disable_config_load: bool`.
      - `TosBuilder` provides no `.disable_config_load()` builder method.
      - `TosBuilder::build()` (`core/services/tos/src/backend.rs:153-168`) 
never reads `config.disable_config_load` and unconditionally pushes 
`EnvCredentialProvider::new()` into a `ProvideCredentialChain`.
   2. **Inconsistent `HOST` header removal after signing in `TosCore::send`**:
      - `TosCore::sign_query` (`core/services/tos/src/core.rs:124`) and 
`TosCore::fetch` (`core/services/tos/src/core.rs:161`) both call 
`parts.headers.remove(HOST)` after signing so the HTTP client sets `Host` / 
`:authority` appropriately for HTTP/1.1 vs HTTP/2.
      - `TosCore::send` (`core/services/tos/src/core.rs:133-141`) omits 
`parts.headers.remove(HOST)`.
   
   ## Expected behavior
   
   - Add `TosBuilder::disable_config_load(mut self) -> Self`.
   - Switch `TosBuilder::build()` to `DefaultCredentialProvider::builder()`, 
calling `.no_env()` when `config.disable_config_load` is `true`.
   - Call `parts.headers.remove(HOST)` after signing in `TosCore::send` to 
match `fetch` and `sign_query`.
   - Add unit tests verifying that `disable_config_load` suppresses environment 
credential loading and that `TosCore::send` does not forward a stale `Host` 
header.
   
   ---
   *Drafted with AI assistance (Gemini 4 Neon) and verified against 
`core/services/tos/src/{config.rs,backend.rs,core.rs}` and 
`reqsign-volcengine-tos` `v0.20.9`.*


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to