Skip to content

Empty request scheme #556

@gavv

Description

@gavv

Hi, it seems there is a regression after commit 40621ed from #539: context.Request().Scheme() now returns empty string for me.

How to reproduce:

package main

import (
    "net/http"
    "github.com/labstack/echo"
    "github.com/labstack/echo/engine/standard"
)

func main() {
    e := echo.New()
    e.GET("/", func(c echo.Context) error {
        return c.String(http.StatusOK, "scheme='"+c.Request().Scheme()+"'")
    })
    e.Run(standard.New(":1323"))
}
$ curl http://127.0.0.1:1323
scheme=''

It returns http as before if I git revert that commit.

In case it matters:

$ go version
go version go1.6.1 linux/amd64

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions