Skip to content

Key value PUT response has new line when running in dev mode #17730

@manderson23

Description

@manderson23

Overview of the Issue

When running in consul under dev mode the boolean response to setting a key value has a new line. There is no new line when running outwith dev mode.


Reproduction Steps

  1. Run consul in dev mode consul agent -data-dir=/tmp/consul -dev
  2. Set KV value curl -v -X PUT --data myvalue http://127.0.0.1:8500/v1/kv/my-key
  3. Response includes a new line
*   Trying 127.0.0.1:8500...
* Connected to 127.0.0.1 (127.0.0.1) port 8500 (#0)
> PUT /v1/kv/my-key HTTP/1.1
> Host: 127.0.0.1:8500
> User-Agent: curl/7.85.0
> Accept: */*
> Content-Length: 7
> Content-Type: application/x-www-form-urlencoded
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json
< Vary: Accept-Encoding
< X-Consul-Default-Acl-Policy: allow
< Date: Wed, 14 Jun 2023 10:53:31 GMT
< Content-Length: 5
< 
true
* Connection #0 to host 127.0.0.1 left intact

compared to a response when running consul without -dev

consul agent -data-dir=/tmp/consul -node consul -bind 127.0.0.1 -server -bootstrap

*   Trying 127.0.0.1:8500...
* Connected to 127.0.0.1 (127.0.0.1) port 8500 (#0)
> PUT /v1/kv/my-key HTTP/1.1
> Host: 127.0.0.1:8500
> User-Agent: curl/7.85.0
> Accept: */*
> Content-Length: 7
> Content-Type: application/x-www-form-urlencoded
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json
< Vary: Accept-Encoding
< X-Consul-Default-Acl-Policy: allow
< Date: Wed, 14 Jun 2023 10:55:51 GMT
< Content-Length: 4
< 
* Connection #0 to host 127.0.0.1 left intact
true[mark@localhost core]$

Operating system and Environment details

Consul 1.15.3 on Fedora 37

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions