mirror of
https://github.com/skidoodle/pastebin
synced 2026-04-28 03:07:40 +02:00
request body too large
This commit is contained in:
+1
-2
@@ -47,9 +47,8 @@ func (h *HttpHandler) HandleSet(w http.ResponseWriter, r *http.Request) {
|
|||||||
data := ViewData{
|
data := ViewData{
|
||||||
Title: "pastebin",
|
Title: "pastebin",
|
||||||
IsPreview: false,
|
IsPreview: false,
|
||||||
Content: r.FormValue("content"),
|
|
||||||
}
|
}
|
||||||
if strings.Contains(err.Error(), "request body too large") {
|
if strings.Contains(err.Error(), "http: request body too large") {
|
||||||
data.Error = "Content too large"
|
data.Error = "Content too large"
|
||||||
} else {
|
} else {
|
||||||
data.Error = "Invalid form data"
|
data.Error = "Invalid form data"
|
||||||
|
|||||||
Reference in New Issue
Block a user