Xuanwo opened a new pull request, #7220:
URL: https://github.com/apache/opendal/pull/7220

   # Which issue does this PR close?
   
   Part of #7062.
   
   # Rationale for this change
   
   `azfile` lister currently treats missing `Content-Length` in list response 
as `0`.
   This conflates "unknown size" with "real zero-byte file", which breaks the 
mandatory list content-length semantics introduced in core.
   
   # What changes are included in this PR?
   
   - Update `core/services/azfile/src/lister.rs`:
     - Stop using `unwrap_or(0)` for file `content_length`.
     - Set `content_length` only when the service response includes 
`Content-Length`.
   
   This keeps real zero-byte files correct while allowing core fallback 
completion logic to handle missing sizes safely.
   
   Validation:
   
   - `cargo fmt`
   - `cargo check --features services-azfile,tests`
   - `cargo test -p opendal-service-azfile`
   
   # Are there any user-facing changes?
   
   Yes.
   
   For `azfile`, list entries no longer report `content_length = 0` when Azure 
File list response omits content length.
   
   # AI Usage Statement
   
   This PR was developed with Codex (GPT-5) assistance.
   


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