|
|
@ -142,9 +142,11 @@ func (rl *rushlink) viewPasteHandlerInner(w http.ResponseWriter, r *http.Request |
|
|
|
rl.viewFileUploadHandler(w, r, fu) |
|
|
|
return |
|
|
|
case db.PasteTypeRedirect: |
|
|
|
if flags&viewNoRedirect == 0 { |
|
|
|
http.Redirect(w, r, p.RedirectURL().String(), http.StatusTemporaryRedirect) |
|
|
|
if flags&viewNoRedirect != 0 { |
|
|
|
w.Write([]byte(p.RedirectURL().String())) |
|
|
|
return |
|
|
|
} |
|
|
|
http.Redirect(w, r, p.RedirectURL().String(), http.StatusTemporaryRedirect) |
|
|
|
return |
|
|
|
default: |
|
|
|
panic("paste type unsupported") |
|
|
|