sklad: use Request.URL when self-redirecting
This commit is contained in:
parent
04e66d7888
commit
301d035425
|
@ -116,7 +116,7 @@ func handleContainer(w http.ResponseWriter, r *http.Request) {
|
||||||
var err error
|
var err error
|
||||||
if r.Method == http.MethodPost {
|
if r.Method == http.MethodPost {
|
||||||
if err = handleContainerPost(r); err == nil {
|
if err = handleContainerPost(r); err == nil {
|
||||||
redirect := "container"
|
redirect := r.URL.EscapedPath()
|
||||||
if shownId != "" {
|
if shownId != "" {
|
||||||
redirect += "?id=" + url.QueryEscape(shownId)
|
redirect += "?id=" + url.QueryEscape(shownId)
|
||||||
}
|
}
|
||||||
|
@ -198,7 +198,7 @@ func handleSeries(w http.ResponseWriter, r *http.Request) {
|
||||||
var err error
|
var err error
|
||||||
if r.Method == http.MethodPost {
|
if r.Method == http.MethodPost {
|
||||||
if err = handleSeriesPost(r); err == nil {
|
if err = handleSeriesPost(r); err == nil {
|
||||||
http.Redirect(w, r, "series", http.StatusSeeOther)
|
http.Redirect(w, r, r.URL.EscapedPath(), http.StatusSeeOther)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// XXX: This is rather ugly.
|
// XXX: This is rather ugly.
|
||||||
|
|
Loading…
Reference in New Issue