ytyou / ticktock

TickTockDB is an OpenTSDB-like time series database, with much better performance.
GNU General Public License v3.0
76 stars 9 forks source link

json write should return !ok if --http.request.format=plain #47

Closed ylin30 closed 1 year ago

ylin30 commented 1 year ago

0.11.7

By default TT --http.request.format=plain, /api/put only accepts plain put. However, if /api/put sends json, it still returns 200.

The other way around is correct, i.e., --http.request.format=json, /api/put fails if it sends plain put.

ylin30 commented 1 year ago

Thinking of removing --http.request.format completely to support Json and plain put at the same time. We can assume plain put by default. If fallback, then check json format. If still fails, then return 500.

Perf should not be affected too much. To do in 0.11.8?

ylin30 commented 1 year ago

Fix already in dev. --http.request.format will be removed in 0.11.8 to be released soon.

ylin30 commented 1 year ago

Fix in 0.11.8 released