Zheaoli commented on code in PR #3771:
URL: 
https://github.com/apache/incubator-opendal/pull/3771#discussion_r1430295143


##########
core/src/raw/http_util/multipart.rs:
##########
@@ -291,7 +291,19 @@ impl Part for FormDataPart {
 
         // Building pre-content.
         for (k, v) in self.headers.iter() {
-            bs.extend_from_slice(k.as_str().as_bytes());
+            // Trick!
+            //
+            // Seafile could not recognize header names like 
`content-disposition`
+            // and requires to use `Content-Disposition`. So we hardcode the 
part
+            // headers name here.
+            match k.as_str() {
+                "content-disposition" => {

Review Comment:
   The HTTP header is case-insensitive, so both `content-disposition` and 
`Content-Disposition` have the same semantic. But the hard code will make us to 
get two different header style.
   
   So would you mind to submit a issue to the seafile and discuss the header 
style with them?
   
   I think we need to to keep the same style as mush as we can



##########
core/src/raw/http_util/multipart.rs:
##########
@@ -291,7 +291,19 @@ impl Part for FormDataPart {
 
         // Building pre-content.
         for (k, v) in self.headers.iter() {
-            bs.extend_from_slice(k.as_str().as_bytes());
+            // Trick!
+            //
+            // Seafile could not recognize header names like 
`content-disposition`
+            // and requires to use `Content-Disposition`. So we hardcode the 
part
+            // headers name here.
+            match k.as_str() {
+                "content-disposition" => {

Review Comment:
   The HTTP header is case-insensitive, so both `content-disposition` and 
`Content-Disposition` have the same semantic. But the hard code will make us to 
get two different header style.
   
   So would you mind to submit an issue to the seafile and discuss the header 
style with them?
   
   I think we need to to keep the same style as mush as we can



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