1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-22 20:37:05 +00:00

nothing tremendous here

Former-commit-id: 9ae6a00400750b9769383ea28bb00f2b202fb79e
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-06-27 16:28:44 +03:00
parent 33028f900d
commit 7e6dc3240a
3 changed files with 11 additions and 17 deletions

View File

@@ -1,7 +1,6 @@
package router
import (
"html"
"net/http"
"sort"
"strings"
@@ -168,17 +167,6 @@ func (h *routerHandler) HandleRequest(ctx context.Context) {
}
ctx.Redirect(url, http.StatusMovedPermanently)
// RFC2616 recommends that a short note "SHOULD" be included in the
// response because older user agents may not understand 301/307.
// Shouldn't send the response for POST or HEAD; that leaves GET.
if method == http.MethodGet {
note := "<a href=\"" +
html.EscapeString(url) +
"\">Moved Permanently</a>.\n"
ctx.ResponseWriter().WriteString(note)
}
return
}