Skip to content

ETag processing errors #18

@pboguslawski

Description

@pboguslawski

Describe the bug

(1) Interactor response struct with ETag response header...

ETag             string   `header:"ETag" json:"-" required:"true" description:"Etag."`

...throws response validation error {"header:Etag":["missing value"]} even if ETag is present in output.

No such problem when header name is Etag

ETag             string   `header:"Etag" json:"-" required:"true" description:"Etag."`

(2) Header names should be processed in case insensitive manner. ETag should be allowed (independent of ETagged interface).

(3) Canonical name is ETag so consider changing in response/encoder.go:

-w.Header().Set("Etag", etag)
+w.Header().Set("ETag", etag)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No 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