Changeset 24 in code for trunk/partage.go
- Timestamp:
- Oct 19, 2021, 6:38:15 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/partage.go
r23 r24 106 106 t, err := template.ParseFiles(conf.templatedir + "/" + f) 107 107 if err != nil { 108 http.Error(w, err, http.StatusInternalServerError)108 http.Error(w, "Internal error", http.StatusInternalServerError) 109 109 return 110 110 } … … 131 131 132 132 if err = writefile(f, r.Body, r.ContentLength); err != nil { 133 http.Error(w, err, http.StatusInternalServerError)133 http.Error(w, "Internal error", http.StatusInternalServerError) 134 134 defer os.Remove(tmp.Name()) 135 135 return … … 154 154 post, err := h.Open() 155 155 if err != nil { 156 http.Error(w, err, http.StatusInternalServerError)156 http.Error(w, "Internal error", http.StatusInternalServerError) 157 157 return 158 158 } … … 162 162 f, err := os.Create(tmp.Name()) 163 163 if err != nil { 164 http.Error(w, err, http.StatusInternalServerError)164 http.Error(w, "Internal error", http.StatusInternalServerError) 165 165 return 166 166 } … … 168 168 169 169 if err = writefile(f, post, h.Size); err != nil { 170 http.Error(w, err, http.StatusInternalServerError)170 http.Error(w, "Internal error", http.StatusInternalServerError) 171 171 defer os.Remove(tmp.Name()) 172 172 return
Note:
See TracChangeset
for help on using the changeset viewer.