You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "ClSlaid (via GitHub)" <gi...@apache.org> on 2023/04/28 13:42:50 UTC

[GitHub] [incubator-opendal] ClSlaid commented on a diff in pull request #2161: feat(http_util): Implement multipart/mixed support

ClSlaid commented on code in PR #2161:
URL: https://github.com/apache/incubator-opendal/pull/2161#discussion_r1180418480


##########
core/src/raw/http_util/multipart.rs:
##########
@@ -231,6 +405,213 @@ content-disposition: form-data; name="submit"
 
 Upload to Amazon S3
 --9431149156168--
+"#;
+
+        assert_eq!(
+            expected,
+            // Rust can't represent `\r` in a string literal, so we
+            // replace `\r\n` with `\n` for comparison

Review Comment:
   I'd like to say "rust will replace CRLF in string literals with LF".



##########
core/src/raw/http_util/multipart.rs:
##########
@@ -15,23 +15,31 @@
 // specific language governing permissions and limitations
 // under the License.
 
+use std::str::FromStr;
+
+use crate::*;
 use bytes::{Bytes, BytesMut};
-use http::{header::CONTENT_DISPOSITION, HeaderMap, HeaderName, HeaderValue};
+use http::{
+    header::{CONTENT_DISPOSITION, CONTENT_LENGTH, CONTENT_TYPE},
+    HeaderMap, HeaderName, HeaderValue, Method, Request, Uri, Version,
+};
+
+use super::{new_request_build_error, AsyncBody};

Review Comment:
   Group `crate` with `super`



-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org