liurenjie1024 commented on code in PR #1010:
URL: https://github.com/apache/iceberg-rust/pull/1010#discussion_r1976827642


##########
crates/catalog/rest/src/catalog.rs:
##########
@@ -160,22 +160,28 @@ impl RestCatalogConfig {
             // The unwrap here is same since we are filtering the keys
             .map(|(k, v)| (k.strip_prefix("header.").unwrap(), v))
         {
-            headers.insert(
-                HeaderName::from_str(key).map_err(|e| {
-                    Error::new(
-                        ErrorKind::DataInvalid,
-                        format!("Invalid header name: {key}"),
-                    )
-                    .with_source(e)
-                })?,
-                HeaderValue::from_str(value).map_err(|e| {
+            let k = HeaderName::from_str(key).map_err(|e| {
+                Error::new(
+                    ErrorKind::DataInvalid,
+                    format!("Invalid header name: {key}"),
+                )
+                .with_source(e)
+            })?;
+            // Multiple values are allowed for headers
+            for (i, value) in value.split(',').enumerate() {

Review Comment:
   The "," splitted string seems an arbitrary decision, even if we actually 
want to use that, we should consider how to escape it. Could you elaborate 
actual case? I didn't see similar handling in java, is there similar thing in 
python? cc @Fokko @sungwy @kevinjqliu 



-- 
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: issues-unsubscr...@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to