splunk / splunk-sdk-python

Splunk Software Development Kit for Python
http://dev.splunk.com
Apache License 2.0
698 stars 370 forks source link

Hec endpoint issue #419

Closed ashah-splunk closed 2 years ago

ashah-splunk commented 2 years ago

Fix for the Issue #345

Previously path was always updated to path + / This implementation fails while using the endpoint /services/collector/event as /services/collector/event/ results in 404

The fix removes the hard coded addition of the / to all the paths, and it makes it conditional based on the presence of the path_segment for the get/post actions. If path_segment' exists thepathwill be updated topath + / `