Repository package build problem v7.x: url.PathEscape failing & causing 405 Method Not Allowed
- Dominant language
- Go
- Stars
- 12.7k
- Forks
- 5k
- Avg merge
- 2d 15m
- Merged PRs (30d)
- 385
Description
It appears standard filebeat create alias functionality is causing:
`{"error":"Incorrect HTTP method for uri [/] and method [PUT], allowed: [POST]","status":405}`
It appears the url.PathEscape in the following code is failing somehow:
https://github.com/elastic/beats/blob/bd0ffc1af3bb6c6b0b61e4324f8d9e905b60b45a/libbeat/idxmgmt/ilm/client_handler.go#L178-L194
I've raised a forum issue here but had no luck so far:
https://discuss.elastic.co/t/incorrect-http-method-for-uri-405-method-not-allowed/370661
Same error on 7.17.25
Contributor guide
Research direction
Start with libbeat/idxmgmt/ilm/client_handler.go lines 178-194 and reproduce the standard Filebeat create-alias request that returns 405. Trace the url.PathEscape behavior against the shown URI and verify completion by confirming the request uses the expected escaped path and method without the 405.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100