Skip to content

What is the purpose of WriteHeaderNow? #2108

@nhooyr

Description

@nhooyr

Why does gin deviate from net/http in that WriteHeader doesn't actually write the header?

You have to call WriteHeaderNow()

func (w *responseWriter) WriteHeaderNow() {

This is causing coder/websocket#166

I'll add a fix in my library to call it but I would prefer if gin deprecated this behaviour or added some docs explaining why its necessary.

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