InfluxDB OSS 2.0 REST API sends HTTP 200 OK after a malformed request

Hello,

I’m testing influxdb:latest docker image. When issuing a malformed cUrl request to a correct API endpoint (note: “&” instead of “?”), I get HTTP 200 OK:

$ curl -sSLv -X POST "http://127.0.0.1:18086/api/v2/query&foo=bar" --header "Authorization: Token bjTN524pwo5rc33ZITTuHTmbcsgRglfTKYht6kPNMFTCaH4pv08e7YsQlWYmfcgbgKH_IFqsdBPMvVSVUL-nBA==" 
*   Trying 127.0.0.1:18086...
* Connected to 127.0.0.1 (127.0.0.1) port 18086 (#0)
> POST /api/v2/query&foo=bar HTTP/1.1
> Host: 127.0.0.1:18086
> User-Agent: curl/7.76.1
> Accept: */*
> Authorization: Token bjTN524pwo5rc33ZITTuHTmbcsgRglfTKYht6kPNMFTCaH4pv08e7YsQlWYmfcgbgKH_IFqsdBPMvVSVUL-nBA==
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< Date: Tue, 01 Jun 2021 12:56:52 GMT
< Content-Length: 1022
< 
{"authorizations":"/api/v2/authorizations","backup":"/api/v2/backup","buckets":"/api/v2/buckets","checks":"/api/v2/checks","dashboards":"/api/v2/dashboards","delete":"/api/v2/delete","external":{"statusFeed":"https://www.influxdata.com/f
eed/json"},"flags":"/api/v2/flags","labels":"/api/v2/labels","me":"/api/v2/me","notificationEndpoints":"/api/v2/notificationEndpoints","notificationRules":"/api/v2/notificationRules","orgs":"/api/v2/orgs","plugins":"/api/v2/telegraf/plug
ins","query":{"analyze":"/api/v2/query/analyze","ast":"/api/v2/query/ast","self":"/api/v2/query","suggestions":"/api/v2/query/suggestions"},"restore":"/api/v2/restore","scrapers":"/api/v2/scrapers","setup":"/api/v2/setup","signin":"/api/
v2/signin","signout":"/api/v2/signout","sources":"/api/v2/sources","swagger":"/api/v2/swagger.json","system":{"debug":"/debug/pprof","health":"/health","metrics":"/metrics"},"tasks":"/api/v2/tasks","telegrafs":"/api/v2/telegrafs","users"
:"/api/v2/users","variables":"/api/v2/variables","write":"/api/v2/write"}
* Connection #0 to host 127.0.0.1 left intact

Is this a bug or a feature?

thanks,
Marek

@Marek at first glance it looks like a bug to me, would you mind opening a new issue against influxdb on GitHub?