diff --git a/bind.go b/bind.go index 8b1692508..c6a1ec9e2 100644 --- a/bind.go +++ b/bind.go @@ -23,7 +23,7 @@ type ( // BindUnmarshaler is the interface used to wrap the UnmarshalParam method. BindUnmarshaler interface { // UnmarshalParam decodes and assigns a value from an form or query param. - UnmarshalParam(src string) error + UnmarshalParam(param string) error } ) diff --git a/middleware/compress.go b/middleware/compress.go index ab76203db..2b2750961 100644 --- a/middleware/compress.go +++ b/middleware/compress.go @@ -90,13 +90,17 @@ func GzipWithConfig(config GzipConfig) echo.MiddlewareFunc { } } +func (w *gzipResponseWriter) WriteHeader(code int) { + if code != http.StatusNoContent { // Issue #489 + w.ResponseWriter.Header().Set(echo.HeaderContentEncoding, gzipScheme) + } + w.ResponseWriter.WriteHeader(code) +} + func (w *gzipResponseWriter) Write(b []byte) (int, error) { if w.Header().Get(echo.HeaderContentType) == "" { w.Header().Set(echo.HeaderContentType, http.DetectContentType(b)) } - if w.Header().Get(echo.HeaderContentEncoding) == "" { - w.Header().Set(echo.HeaderContentEncoding, gzipScheme) - } return w.Writer.Write(b) } diff --git a/website/layouts/index.html b/website/layouts/index.html index 328454dac..f24ae5f5d 100644 --- a/website/layouts/index.html +++ b/website/layouts/index.html @@ -12,7 +12,7 @@

{{ .Site.Data.index.heading }}

{{ .Site.Data.index.description }}

- Echo + Echo

diff --git a/website/layouts/partials/head.html b/website/layouts/partials/head.html index 13ee57e41..0e690ed02 100644 --- a/website/layouts/partials/head.html +++ b/website/layouts/partials/head.html @@ -5,16 +5,18 @@ - + + - + + + - - + {{ if ne .URL "/" }}{{ .Title }} | {{ end }}{{ .Site.Title }} diff --git a/website/layouts/partials/notice.html b/website/layouts/partials/notice.html index b024bc845..9c7881ce3 100644 --- a/website/layouts/partials/notice.html +++ b/website/layouts/partials/notice.html @@ -1,8 +1,8 @@ - + diff --git a/website/static/images/share.png b/website/static/images/share.png new file mode 100644 index 000000000..1ac86f574 Binary files /dev/null and b/website/static/images/share.png differ diff --git a/website/static/images/echo_terminal.png b/website/static/images/terminal.png similarity index 100% rename from website/static/images/echo_terminal.png rename to website/static/images/terminal.png diff --git a/website/static/styles/main.css b/website/static/styles/main.css index e69de29bb..8b1378917 100644 --- a/website/static/styles/main.css +++ b/website/static/styles/main.css @@ -0,0 +1 @@ +