From 08a180f1ce8ddcca57f28237a09ff75d7b36ef68 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 2 Apr 2016 21:01:49 +0200 Subject: fix max upload size for 32bit 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) { -- cgit v0.10.2