-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[console] GET with body acts as POST #11125
Comments
@tylersmalley any chance this is something we can tackle before 6.0? |
@alexbrasetvik, we will try for it. It's all dependent on when the 6.0 migration changes are finalized. |
awesome - thanks @tylersmalley. You tagged the wrong Alex btw. I'm the one with the extremely French Canadian last name 😄 |
this bug just bit me in production, and I can't delete the mappings that were created by another dev :( this is pretty severe bug IMO and apparently present in much earlier versions |
If you look at the network tab, GET is being modified by a POST internally: This issue is mainly in Kibana devtools that it is modifying the method and not in elasticsearch updating documents with GET operations. That said, until we do not fix this the workarounds are:
|
A quick summary what's happening: browsers will strip request bodies on GET requests, so we automatically convert these to POST requests. I completely agree that this shouldn't be happening, but the fix needs to have a broader discussion because chunks of the elasticsearch docs use GET requests with bodies and have a view in console button, example |
Blocked by updating all the docs as @jbudz pointed out above. |
@tylersmalley If all the documentation was updated, then why is the issue blocked? I think you mean unblocked, right? |
@amerzad, the documentation has not been updated - so this issue is blocked on the completion of that. |
I got bitten today by this bug as well....three of us spent 2 hours trying to find the root cause.... |
@wangyunlongau , me too. When testing Kibana it's very easy to trigger this bug. Perhaps some error-checking on the front-end could issue a warning. |
Pinging @elastic/es-ui |
For anyone who's interested, I'm solving this in #39170 by removing the coercion from GET to POST in the browser and swapping out our http lib on the server with one that allows bodies with GET requests (and DELETE requests). |
Per a slack discussion https://elastic.slack.com/archives/C0D1XEXEZ/p1628706191394900 There is a misleading issue with Kibana > Dev Tools, regarding posting a GET request with a body, in particular say a search. GET [index]/_search {....} this gets converted to a POST request. It can be seen if you are looking at the console view in the browser tools. This can cause different responses (different results) when using Kibana versus other tools ex. POSTMAN when diagnosing something such as a search query with aggs. See references: #11593 #11125 #11948 This doc change is to add it so that is it more obvious that we do this (transform to POST when GET has body).
Kibana version:
5.3.0
Elasticsearch version:
5.3.0
Server OS version:
Mac
Browser version:
Chrome 57
Browser OS version:
Original install method (e.g. download page, yum, from source, etc.):
download page
Description of the problem including expected versus actual behavior:
Steps to reproduce:
{
"_index": "customer",
"_type": "test",
"_id": "AVtYSTXO_fGvlLKTJrMR",
"_version": 1,
"result": "created",
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
},
"created": true
}
GET should never insert a document!
The text was updated successfully, but these errors were encountered: