Avoid overriding specific Content-Type and Accept headers#394
Open
shackra wants to merge 4 commits intoConductorOne:mainfrom
Open
Avoid overriding specific Content-Type and Accept headers#394shackra wants to merge 4 commits intoConductorOne:mainfrom
shackra wants to merge 4 commits intoConductorOne:mainfrom
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 (
|
Contributor
Author
|
@ggreer I can't assign reviewers for this PR, so, can you review this? 😬 |
Contributor
Author
|
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
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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