mkmik commented on code in PR #4271:
URL: https://github.com/apache/arrow-rs/pull/4271#discussion_r1204462482


##########
arrow-flight/src/bin/flight_sql_client.rs:
##########
@@ -49,7 +49,7 @@ where
         match parts.as_slice() {
             [key, value] => {
                 let key = K::from_str(key).map_err(|e| e.to_string())?;
-                let value = V::from_str(value).map_err(|e| e.to_string())?;
+                let value = V::from_str(value.trim_start()).map_err(|e| 
e.to_string())?;

Review Comment:
   Yeah I thought only leading whitespace was trimmed in HTTP/1.1 (upon which 
the CLI tools like curl are modelled on), but it turns out that trailing 
whitespace is optioinal too:
   
   https://www.rfc-editor.org/rfc/rfc7230#appendix-B
   
   ```
   OWS = *( SP / HTAB )
   header-field  = field-name ":" OWS field-value OWS
   field-value   = *( field-content / obs-fold )
   field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
   field-vchar   = VCHAR / obs-text
   ```



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