You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Extract just the media type part (before any semicolon)
51
-
mediaType:=contentTypeHeader
52
-
ifidx:=len(contentTypeHeader); idx>0 {
53
-
// Find the semicolon that separates media type from charset
54
-
fori, ch:=rangecontentTypeHeader {
55
-
ifch==';' {
56
-
mediaType=contentTypeHeader[:i]
57
-
break
58
-
}
59
-
}
60
-
}
61
-
req.ContentType=mediaType
62
-
logger.Debug().Str("endpoint", "send_message").Str("content_type_header", contentTypeHeader).Str("extracted_media_type", mediaType).Msg("content type extracted from header")
63
-
}
47
+
// // Override content_type from the Content-Type header if present
// // Extract just the media type part (before any semicolon)
51
+
// mediaType := contentTypeHeader
52
+
// if idx := len(contentTypeHeader); idx > 0 {
53
+
// // Find the semicolon that separates media type from charset
54
+
// for i, ch := range contentTypeHeader {
55
+
// if ch == ';' {
56
+
// mediaType = contentTypeHeader[:i]
57
+
// break
58
+
// }
59
+
// }
60
+
// }
61
+
// req.ContentType = mediaType
62
+
// logger.Debug().Str("endpoint", "send_message").Str("content_type_header", contentTypeHeader).Str("extracted_media_type", mediaType).Msg("content type extracted from header")
0 commit comments