-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Hi there. I'm testing out com.google.cloud.storage.Storage.writer() for writing to GCS. It works very well for files smaller than 2GB, but right around the 2GB mark WriteChannel throws an exception indicating that there's something wrong with the Content-Range header.
com.google.api.client.http.HttpResponseException: 400|Failed to parse Content-Range header.
I noticed that the Content-Range header is set in com.google.cloud.storage.spi.DefaultStorageRpc.write() and is calculated using com.google.cloud.BaseWriteChannel.position, which is an int. The problem is that at the 2GB mark the position variable overflows and becomes negative, causing panic and mayhem.
Here are some screenshots to paint a fuller picture:
Any chance we can get a patch for this? Should I submit a pull request?

