Skip to content

/api/v1/updates not compliant with RFC 7230 #1367

@DerrickMartinez

Description

@DerrickMartinez

I have /api/v1/updates behind envoy, I noticed that this endpoint was causing some issues and it turns out that it's returning a content-length header on this HTTP 204.

To reproduce

curl --http2-prior-knowledge -H "Cookie: defguard_session=MYCOOKIE;" http://localhost:8000/api/v1/updates -v

And you'll see something like:

* Request completely sent off
< HTTP/2 204 
< content-type: application/json
< x-defguard-version: 1.5.0-a29ac10
* Invalid HTTP header field was received: frame type: 1, stream: 1, name: [content-length], value: [34]
* HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)
* Connection #0 to host localhost left intact
curl: (92) Invalid HTTP header field was received: frame type: 1, stream: 1, name: [content-length], value: [34]

A 204 should be empty

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Ready to release

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions