silver-ymz opened a new issue, #1999:
URL: https://github.com/apache/incubator-opendal/issues/1999

   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](https://stackoverflow.com/questions/63037392/http-1-1-411-length-required-on-rest-api-post-call-from-azure-api-management-ser)


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