| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
@sullivanmatt overall, the change looks great. A few notes:
|
Sorry, something went wrong.
|
@sullivanmatt do you think you're going to pick this up again? |
Sorry, something went wrong.
|
Yikes, it's been a while, hasn't it? Yes, I do plan to pick this back up, if you don't mind leaving it open for a bit. Thanks! |
Sorry, something went wrong.
|
Yep - no problem. Let's just rebase it on top of develop, which will pick up the automated CI now, and address the comments above. By the way, there was a similar change in the Ruby SDK - you can take a look there what was done. |
Sorry, something went wrong.
|
Going to close this PR and issue the PRs for connection-close and the basic auth stuff as separate issues. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Forgive these two minor fixes being in the same PR. I discovered the HTTP/1.1 proxy issue while working on testing my changes for Basic Auth.
Support for passing in Basic Auth tokens
This pull request modifies the way Splunk handles user-specified tokens. Currently, tokens that don't start with 'Splunk' get this prefix automatically inserted. This clobbers any Basic Auth tokens that the user has previously explicitly passed in:
Resolve issue with HTTP/1.1 reverse proxies
The Splunk SDK uses the built-in Python library httplib for making HTTP connections. This library does not support the use of HTTP/1.1 Connection: keep-alive. When used in its default mode, the request header Connection: close is automatically added to ensure compatibility with servers isn't broken. However the Splunk library passes in its own headers without a Connection declaration. Normally this isn't a problem, as the splunkd server running on 8089 does not support keep-alive either and just assumes the behavior to be close.
However if using a reverse proxy in front of this service, major issues arise because the SDK is not conforming to the HTTP/1.1 header spec, RFC2616 Section 14.10:
In my testing (nginx and Apache2), Splunk SDK would receive an empty response on all GET requests and fail. With this change, all requests proceed as expected.