Bug 35978 - tomcat truncate very big files
Summary: tomcat truncate very big files
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Servlets:WebDAV (show other bugs)
Version: 5.5.10
Hardware: Other All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-02 19:32 UTC by Daniel Roche
Modified: 2005-08-04 09:10 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Roche 2005-08-02 19:32:44 UTC
in the webdav tomcat sample application i have copied a very 
big file ( 6 Gigabytes ) 

i can see the file when i browse the directory with a browser 
and the size of the file is correctly displayed .

when i try to download this file the resulting file is silently truncated
to 2 Gigabytes

i have tried several web clients to download ( firefox, wget, curl, cadaver ) 
on both linux and windows platform, with always the same truncated result.

on the server side i have tested with both win2003 and linuxFC3 with 
both tomcat5.0.28 and tomcat5.5.10 and with both java1.4.2_08 and java1.5.0_04
( to be honest, i have not tested all the possible combinations !) 
but every test produce the truncate problem.

Regards
Comment 1 Remy Maucherat 2005-08-02 19:54:04 UTC
I think you should plan to investigate the issue yourself, as:
- AFAIK large files work on the download direction (all people care about is
that when dealing with large files)
- few people care about WebDAV functionality beyond basic stuff
Comment 2 Daniel Roche 2005-08-04 14:39:02 UTC
(In reply to comment #1)
> I think you should plan to investigate the issue yourself, as:
> - AFAIK large files work on the download direction (all people care about is
> that when dealing with large files)

Do you mean that people split their big files ? It may be a solution but 
it is not always possible !

> - few people care about WebDAV functionality beyond basic stuff

I have made some more tests, and it happen also with a simple tomcat app
without webdav functionality. Files between 2Gb and 4Gb do not produce
the problem, only files > 4 Gb.

Regards

Comment 3 Remy Maucherat 2005-08-04 14:58:06 UTC
I wrote (which I think was simple to understand): "I think you should plan to
investigate the issue yourself". This means more than doing tests: start
thinking about at least HTTP dumps as the minimum.
Comment 4 Tim Funk 2005-08-04 16:02:24 UTC
I uploaded and downloaded (the same file) a 2614816768 byte file without an issue.

Using winxp and tomcat 5.1.{CVS HEAD}

Comment 5 Tim Funk 2005-08-04 16:07:30 UTC
idiot ... i meant 5.5.{cvs head}
Comment 6 Remy Maucherat 2005-08-04 16:10:52 UTC
He said only > 4GB was an issue. I think we should wait for at least HTTP dumps
before we start testing this issue.
Comment 7 Remy Maucherat 2005-08-04 17:06:01 UTC
.
Comment 8 Remy Maucherat 2005-08-04 17:10:17 UTC
Although it is not possible to know for sure without appropriate information,
there was a rather obvious defect in DefaultServlet, which causes a bad
content-length for ranges > 2GB. As the only reasonable strategy for
transferring such files is to use many single range requests, this was not
tested well.