artiya4u / google-http-java-client

Automatically exported from code.google.com/p/google-http-java-client
0 stars 0 forks source link

problem downloading files >= 2gb from google storage. Get connection timeout after file transferred #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Version of google-http-java-client (e.g. 1.5.0-beta)?
1.6.0-beta-SNAPSHOT
latest from default branch

Java environment (e.g. Java 6, Android 2.3, App Engine)?
Java 6.

Describe the problem.
No issue with files less than 2 gb in size.  But for files equal or greater 
than 2gb on last read I would expect to receive a -1 to indicate EOF, but 
instead I get a socket timeout.

How would you expect it to be fixed?
-1 retrieved from read instead of socket timeout exception.

Original issue reported on code.google.com by daniel...@google.com on 3 Oct 2011 at 12:54

GoogleCodeExporter commented 9 years ago
Thanks for reporting the problem, Daniel.  According to Daniel, this reproduces 
with NetHttpTransport, but not with ApacheHttpTransport, so may be specific to 
NetHttpTransport.

Original comment by yan...@google.com on 3 Oct 2011 at 4:28

GoogleCodeExporter commented 9 years ago
Perhaps related to this code: From class NetHttpRequest: Method 
LowLevelHttpResponse:
        if (contentLength >= 0 && contentLength <= Integer.MAX_VALUE) {
          connection.setFixedLengthStreamingMode((int) contentLength);
        } else {
          connection.setChunkedStreamingMode(0);
        }

Original comment by daniel...@google.com on 5 Oct 2011 at 6:39

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 11 Nov 2011 at 1:58

GoogleCodeExporter commented 9 years ago

Original comment by rmis...@google.com on 9 Mar 2012 at 5:01

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 27 Mar 2012 at 2:22

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 25 Apr 2012 at 10:35

GoogleCodeExporter commented 9 years ago

Original comment by rmis...@google.com on 14 May 2012 at 2:14

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 31 May 2012 at 1:24

GoogleCodeExporter commented 9 years ago
I have tried to reproduce this in the past unsuccessfully and we now have 
resumable media download which should be used for downloading very large files:
http://code.google.com/p/google-api-java-client/wiki/MediaDownload#Resumable_Med
ia_Download

Can this bug be closed?

Original comment by rmis...@google.com on 17 Jul 2012 at 2:37