ferhatelmas commented on code in PR #673:
URL: https://github.com/apache/iceberg-go/pull/673#discussion_r2678757654


##########
catalog/rest/rest.go:
##########
@@ -209,6 +209,11 @@ const emptyStringHash = 
"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991
 
 func (s *sessionTransport) RoundTrip(r *http.Request) (*http.Response, error) {
        for k, v := range s.defaultHeaders {
+               // Skip Content-Type if it's already set in the request
+               // to avoid duplicate headers (e.g., when using PostForm)
+               if http.CanonicalHeaderKey(k) == "Content-Type" && 
r.Header.Get("Content-Type") != "" {

Review Comment:
   It's not the same case because we want it in default headers unconditionally 
but not in fetch token which sets directly to a different value 
(`application/x-www-form-urlencoded`). Even if it's set there optionally, it 
wouldn't prevent duplication



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to