Добавлены обработчики для Legacy запросов

This commit is contained in:
ErickSkrauch
2016-07-07 13:10:39 +03:00
parent e3f744ed10
commit 4da7a566f7
4 changed files with 70 additions and 0 deletions

View File

@@ -22,3 +22,14 @@ func Skin(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, rec.Url, 301);
}
func SkinGET(w http.ResponseWriter, r *http.Request) {
username := r.URL.Query().Get("name")
if username == "" {
w.WriteHeader(http.StatusBadRequest)
return
}
mux.Vars(r)["username"] = username
Skin(w, r)
}