dosubot[bot] commented on issue #7821: URL: https://github.com/apache/opendal/issues/7821#issuecomment-4806665823
<!-- Answer --> Thanks for sharing the full error. The HTTP 411 (Length Required) response confirms what @Xuanwo mentioned — NetApp's S3 implementation requires an explicit `Content-Length` header on the CopyObject PUT request. Looking at the current code, the `s3_copy_object` method sets the request body to an empty `Buffer::new()` but does **not** explicitly include a `Content-Length: 0` header [[1]](https://github.com/apache/opendal/blob/27d5677d4526519313cbce00cd28f8fbcc099642/core/src/services/s3/core.rs#L655-L710). It relies on the HTTP client to infer it. AWS S3 accepts this, but NetApp's implementation is stricter and rejects the request without an explicit header. The fix would be straightforward — explicitly add `Content-Length: 0` to the copy request headers in [`core/src/services/s3/core.rs`](https://github.com/apache/opendal/blob/27d5677d4526519313cbce00cd28f8fbcc099642/core/src/services/s3/core.rs#L710), similar to how other S3 operations in the same file already do it [[2]](https://github.com/apache/opendal/blob/27d5677d4526519313cbce00cd28f8fbcc099642/core/src/services/s3/core.rs#L885). This wouldn't affect AWS S3 behavior and would make NetApp (and likely other S3-compatible servers) work correctly. In the meantime, you can use the read → write → delete workaround you mentioned for both the AZDLS and NetApp S3 cases. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fopendal).* --- Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fopendal). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fopendal&message_id=d1dbfe2a-4e46-42c7-9a97-39d97d4f6a7e) [](https://github.dosu.com/apache/opendal?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fopendal) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fopendal) -- 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]
