summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-04-02 19:01:49 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-04-02 19:01:49 (GMT)
commit08a180f1ce8ddcca57f28237a09ff75d7b36ef68 (patch)
tree87137806cc9cd8df189ce02eaa5c4f47eca8cb7f
parenta2cf7b1b97f4acfe2afe5734e2bcb910cdc68364 (diff)
fix max upload size for 32bit
-rw-r--r--src/rhimportd/uploadWeb.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rhimportd/uploadWeb.go b/src/rhimportd/uploadWeb.go
index 4b56a43..8e7dfb7 100644
--- a/src/rhimportd/uploadWeb.go
+++ b/src/rhimportd/uploadWeb.go
@@ -59,7 +59,7 @@ func webUploadResponse(w http.ResponseWriter, file string) {
}
const (
- webUploadMaxRequestSize = 2 << 30 // 2GB
+ webUploadMaxRequestSize = (2 << 30) - 1 // 2GB, (2 << 30) overflows int on 32-bit systems therefore we use 2GB - 1 Byte
)
func webUploadHandler(conf *rhimport.Config, db *rddb.DBChan, sessions *rhimport.SessionStoreChan, trusted bool, w http.ResponseWriter, r *http.Request) {