Closed original-brownbear closed 4 years ago
Pinging @elastic/es-core-infra (:Core/Infra/REST API)
will work on it. this also highlights a problem that we do not handle invalid headers properly. there should not be a stactrace in logs (we are incorrectly creating bad rest request atm)
my understanding so far was that we do not support content negotiation. I would prefer we reject requests with these headers (the pr is linked)
I am not sure we documented the usage of GET from browser, so possibly this won't be a breaking change. @jakelandis what do you think?
edit: after discussing this offline with @original-brownbear , we might want to support this. We even return a favicon so that it looks nice in a browser. I would try to default to application/json (current behaviour)
Some recent changes to the media type header handling logic completely broke opening ES APIs from the browser. If I try to open any GET URL in Chrome I get this on current master (same from other browsers just slightly different media type headers there, the issue really is that we don't accept these multi-types separated by
,
any longer it seems):I'm assigning you here @pgomulka since I think you're working on this logic as of right now so I don't want to interfere with that. If that's not the case feel free to assign me and I'll fix this real quick.