Skip to content

ResponseWriter nil #100

@VonLisboa

Description

@VonLisboa

// Retrieve the http.ResponseWriter from the context
if rw, ok := r.Context().Value(0).(http.ResponseWriter); ok {
http.Redirect(rw, r, redirect.RedirectTo, redirect.HTTPStatusCode)
} else {
log.Error("Failed to retrieve the http.ResponseWriter from the context")
}

In this redirection code the ResponseWriter is always null and falls into 'else'.
The redirection doesn't work and return a blank page.

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