Skip to content

Logger panics after SetHeader with empty string #2295

Closed
@glumpo

Description

@glumpo

Issue Description

Checklist

  • Dependencies installed
  • No typos
  • Searched existing issues and docs

Expected behaviour

package main

import (
	"github.com/labstack/echo/v4"
)

func main() {
	e := echo.New()
	e.Logger.SetHeader("")
	e.Logger.Error("Hellow")
}

I expect code above to print just a message "Hellow"

Actual behaviour

Code panics.

Steps to reproduce

go run ./main.go with code above.

Version/commit

v4.9.0
Also checked on latest commit 666938e

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