1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-10 05:25:58 +00:00

remove any trailing slash that may passed on StaticEmbeddedHandler (although all examples shows the correct way but you never know)

Former-commit-id: 50ab9ddb2e738b4061622ac9ebcfec30e0cdecfa
This commit is contained in:
Gerasimos Maropoulos
2018-03-16 12:38:13 +02:00
parent 87036fdb6c
commit 8cec6a6f9b
3 changed files with 16 additions and 2 deletions

View File

@@ -85,7 +85,9 @@ func (w *ResponseRecorder) EndResponse() {
// possible to maximize compatibility.
func (w *ResponseRecorder) Write(contents []byte) (int, error) {
w.chunks = append(w.chunks, contents...)
return len(w.chunks), nil
// Remember that we should not return all the written length within `Write`:
// see https://github.com/kataras/iris/pull/931
return len(contents), nil
}
// Writef formats according to a format specifier and writes to the response.