mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/protoparser/common: do not read request body when parsing timestamp
query arg
This was preventing from reading data via /api/v1/prometheus/import . Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/750
This commit is contained in:
parent
81c05f669b
commit
5cf5a0e8c4
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ import (
|
||||||
//
|
//
|
||||||
// It returns 0 if there is no `timestamp` query arg.
|
// It returns 0 if there is no `timestamp` query arg.
|
||||||
func GetTimestamp(req *http.Request) (int64, error) {
|
func GetTimestamp(req *http.Request) (int64, error) {
|
||||||
ts := req.FormValue("timestamp")
|
ts := req.URL.Query().Get("timestamp")
|
||||||
if len(ts) == 0 {
|
if len(ts) == 0 {
|
||||||
return 0, nil
|
return 0, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue