Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

azblob: copy operation raise error 411 Length Required #1999

Closed
silver-ymz opened this issue Apr 14, 2023 · 0 comments · Fixed by #2000
Closed

azblob: copy operation raise error 411 Length Required #1999

silver-ymz opened this issue Apr 14, 2023 · 0 comments · Fixed by #2000

Comments

@silver-ymz
Copy link
Member

When I try to use copy operation in azblob, it will return error about 411 length required.

The whole error message is

Error: Unexpected (permanent) at  => <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Length Required</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Length Required</h2>
<hr><p>HTTP Error 411. The request must be chunked or have a content length.</p>
</BODY></HTML>


Context:
    response: Parts { status: 411, version: HTTP/1.1, headers: {"content-type": "text/html; charset=us-ascii", "server": "Microsoft-HTTPAPI/2.0", "date": "Fri, 14 Apr 2023 16:27:40 GMT", "connection": "close", "content-length": "344"} }

And my code is

let mut builder = services::Azblob::default();
    builder
        .endpoint(SECRET)
        .account_name(SECRET)
        .container(SECRET)
        .account_key(SECRET);
let op = Operator::new(builder)?.finish();
op.write("hello.txt", "Hello, world!").await?;
op.copy("hello.txt", "hello2.txt").await?;

Related question: HTTP/1.1 411 Length Required on REST API Post call from Azure API Management Service

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant