test.winehq.org already sets $CGI::POST_MAX to reject oversize reports. Furthermore truncated reports are rejected anyway. So avoid the code duplication and inconsistencies between the winetest and test.winehq.org (or other site) size limits.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- programs/winetest/send.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/programs/winetest/send.c b/programs/winetest/send.c index 4b575e11a34..2416faa3192 100644 --- a/programs/winetest/send.c +++ b/programs/winetest/send.c @@ -162,15 +162,9 @@ send_file_direct (const char * url, const char *name) report (R_WARNING, "Can't open file '%s': %u", name, GetLastError()); goto abort1; } - filesize = GetFileSize( file, NULL ); - if (filesize > 1.5*1024*1024) { - report (R_WARNING, - "File too big (%.1f MB > 1.5 MB); submitting partial report.", - filesize/1024.0/1024); - filesize = (DWORD) 1.5*1024*1024; - }
report (R_STATUS, "Sending header"); + filesize = GetFileSize( file, NULL ); str = strmake (&total, body1, name); ret = send_str (s, head, filesize + total + sizeof body2 - 1) || send_buf (s, str, total); @@ -339,14 +333,6 @@ send_file_wininet (const char *url, const char *name) goto done; }
- filesize = GetFileSize( file, NULL ); - if (filesize > 1.5*1024*1024) { - report (R_WARNING, - "File too big (%.1f MB > 1.5 MB); submitting partial report.", - filesize/1024.0/1024); - filesize = 1.5*1024*1024; - } - report (R_STATUS, "Opening %s connection to %s:%d", (uc.nScheme == INTERNET_SCHEME_HTTP ? "http" : "https"), uc.lpszHostName, uc.nPort); @@ -369,6 +355,7 @@ send_file_wininet (const char *url, const char *name) }
report (R_STATUS, "Sending request"); + filesize = GetFileSize( file, NULL ); str = strmake (&total, body1, name); memset(&buffers_in, 0, sizeof(INTERNET_BUFFERSA)); buffers_in.dwStructSize = sizeof(INTERNET_BUFFERSA);
Also the maximum report size is no longer duplicated in WineTest.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- Trying to keep the WineTest report size under 1.5 MB did not work. --- winetest/winetest.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/winetest/winetest.conf b/winetest/winetest.conf index 3db146a9f..0b8fd630b 100644 --- a/winetest/winetest.conf +++ b/winetest/winetest.conf @@ -23,8 +23,7 @@ $acceptprediluvianwin = 0; $maxunitsize = 32 * 1024;
# Maximum size of the report file -# This should be in line with programs\winetest\send.c -$maxfilesize = 1.5 * 1024 * 1024; +$maxfilesize = 2 * 1024 * 1024;
# The number of builds after which a failure is considered old / new $patternbuilds = 10;