diff options
author | Maxim Lebedev <git@toby3d.me> | 2019-05-27 20:04:22 +0500 |
---|---|---|
committer | Kirill Danshin <kirill@danshin.pro> | 2019-05-28 18:04:24 +0300 |
commit | d3715c361c6d8d227117caa9a7e6872498bf7283 (patch) | |
tree | 98932544f9e85d6e0693e1467195001a5ac955f7 /client_timing_test.go | |
parent | :sparkles: Added headers keys constants (diff) | |
download | fasthttp-d3715c361c6d8d227117caa9a7e6872498bf7283.tar.gz fasthttp-d3715c361c6d8d227117caa9a7e6872498bf7283.tar.bz2 fasthttp-d3715c361c6d8d227117caa9a7e6872498bf7283.zip |
:zap: Used Headers constants instead raw strings
Diffstat (limited to 'client_timing_test.go')
-rw-r--r-- | client_timing_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/client_timing_test.go b/client_timing_test.go index 8cc72a2..1a97cd8 100644 --- a/client_timing_test.go +++ b/client_timing_test.go @@ -186,7 +186,7 @@ func fasthttpEchoHandler(ctx *RequestCtx) { } func nethttpEchoHandler(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "text/plain") + w.Header().Set(HeaderContentType, "text/plain") w.Write([]byte(r.RequestURI)) } @@ -516,7 +516,7 @@ func BenchmarkNetHTTPClientEndToEndBigResponse10Inmemory(b *testing.B) { func benchmarkNetHTTPClientEndToEndBigResponseInmemory(b *testing.B, parallelism int) { bigResponse := createFixedBody(1024 * 1024) h := func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "text/plain") + w.Header().Set(HeaderContentType, "text/plain") w.Write(bigResponse) } ln := fasthttputil.NewInmemoryListener() |