f7c6534a79
http.NewRequestWithContext will only set the right value for Content-Length if the input is *bytes.Buffer, *bytes.Reader, or *strings.Reader [0]. Since os.Stdin is an os.File, POST requests made with the `nomad operator api` command would always have Content-Length set to -1, which is interpreted as an unknown length by web servers. [0]: https://pkg.go.dev/net/http#NewRequestWithContext
4 lines
109 B
Plaintext
4 lines
109 B
Plaintext
```release-note:bug
|
|
cli: set content length on POST requests when using the `nomad operator api` command
|
|
```
|