I am reading a file being uploaded over the web and it is being sent through http and we are receiving through a BufferedInputStream. Sometimes we get a timeout exception in the middle of reading from the stream. My working theory is that the connection is being closed from the client before we can process the whole file. The file is in the order of mb.
Does this theory make sense? Does the client need to keep the connection open in order for the server to completely read bytes from the input stream?
No good news in that case, data lost will occur.