-
Notifications
You must be signed in to change notification settings - Fork 4
Avoid overriding specific Content-Type and Accept headers #394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Avoid overriding specific Content-Type and Accept headers #394
Conversation
For some APIs, like Share Point REST API, providing additional information on the Content-Type can determine if the request fails or success (given that the actual content is what the API expects). This change prevents the SDK from blindly overwriting values for those two headers.
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@ggreer I can't assign reviewers for this PR, so, can you review this? 😬 |
|
El martes 26 de agosto del 2025, cursor[bot] escribió:
@cursor[bot] commented on this pull request.
The special handling for Content-Type and Accept headers has two
issues. The logic's case-sensitive map access
can prevent existing headers from being found, leading to
duplicate logical headers.
you mean, like having `Content-Type` there and then setting
`content-type` on the map? well, that could be a problem, yes.
Also, it only updates
these headers if the new value contains a semicolon, silently
ignoring explicit overrides with simpler values.
that's the point, my binary friend, as that was the previous
behavior (always overwriting
the values)
…--
Jorge Araya
Contacto:
Telegram: t.me/shackra · Signal: Shackra.28
|

For some APIs, like Share Point REST API, providing additional information on the Content-Type can determine if the request fails or success (given that the actual content is what the API expects). This change prevents the SDK from blindly overwriting values for those two headers.
Summary by CodeRabbit
Bug Fixes
Tests