Skip to content

Etag header should be double-quoted #2404

@axw

Description

@axw

As described in https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag (and the relevant RFC), Etag values should be double-quoted. The server currently does not do this:

$ curl -v http://localhost:8200/config/v1/agents?service.name=foo
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8200 (#0)
> GET /config/v1/agents?service.name=foo HTTP/1.1
> Host: localhost:8200
> User-Agent: curl/7.58.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Cache-Control: max-age=30, must-revalidate
< Content-Type: application/json
< Etag: bxyV1WsBXaU8VEI7_C0d
< Date: Tue, 09 Jul 2019 07:15:10 GMT
< Content-Length: 25
< 
{
  "sample_rate": "1"
}

This could be problematic if a caching proxy were placed in front.

If-None-Match values should be double-quoted too.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions