Repository navigation
Conversation
Contributor
🤖 AI-Powered Code Review AvailableYou can leverage AI-powered code review to assist with this PR! Available Commands:
|
…(XSUP-80754) splunklib defaults POST bodies to application/x-www-form-urlencoded, so splunkd validated the JSON payload as URI-encoded data and rejected any note containing a bare "%" (e.g. "0%.") with HTTP 400 "Unparsable URI-encoded request data". Add a _post_json() helper that sets Content-Type: application/json and use it for notes, investigation/finding updates, the ES REST helper and add-findings.
ilappe
force-pushed
the
ilappe/XSUP-80754/splunkpyv2-notes-json-content-type
branch
from
November 11, 2026 11:18
67d93ff to
5795f12
Compare
Contributor
|
🤖 Analysis started. Please wait for results... |
Contributor
🤖 AI Review DisclaimerThis review was generated by an AI-powered tool and may contain inaccuracies. Please be advised, and we extend our sincere apologies for any inconvenience this may cause. |
marketplace-ai-reviewer
left a comment
Contributor
There was a problem hiding this comment.
Thank you for your contribution! No issues found. Great work! 👍
@kamalq97, @DeanArbel, @ilappe please review and approve the results generated by the AI Reviewer by responding 👍 on this comment.
This branch has not been deployed
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.
Summary
splunk-finding-event-edit,splunk-update-investigation, or outgoing mirroring failed withHTTP 400 Unparsable URI-encoded request datawhenever the note contained a bare%(for example0%.). The integration sent JSON bodies without a Content-Type, so splunklib used its defaultapplication/x-www-form-urlencoded, and splunkd rejected the body as invalid URI-encoded data._post_json()helper sendsContent-Type: application/json. In the splunklib version shipped in the image, the form header is added only when no Content-Type is set. All JSON POSTs to the Mission Control v2 API now use the helper: notes, investigation/finding updates,_es_rest_request, and add findings.Service, using notes with%,+,&and%20. They check the headers and the raw body, and they fail on the old code. Another test covers the path throughrequests_handler, and the existing assertions are updated.Related Issues
fixes: XSUP-80754