1
0
mirror of https://github.com/labstack/echo.git synced 2025-07-03 00:56:59 +02:00

Proper header and MIME constants

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana
2016-04-06 07:28:53 -07:00
parent adad28012c
commit 8b5772cf65
10 changed files with 92 additions and 93 deletions

View File

@ -63,14 +63,14 @@ func TestLoggerIPAddress(t *testing.T) {
})
// With X-Real-IP
rq.Header().Add(echo.XRealIP, ip)
rq.Header().Add(echo.HeaderXRealIP, ip)
h(c)
assert.Contains(t, ip, buf.String())
// With X-Forwarded-For
buf.Reset()
rq.Header().Del(echo.XRealIP)
rq.Header().Add(echo.XForwardedFor, ip)
rq.Header().Del(echo.HeaderXRealIP)
rq.Header().Add(echo.HeaderXForwardedFor, ip)
h(c)
assert.Contains(t, ip, buf.String())