This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getContentLength() clarification

dema rogatkin
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm working on fixing Slide bug "can't handle files > 2GB". The problem issued that content length is bigger than MAX_INT. Spec for getContentLength() states:

Returns the length, in bytes, of the request body and made available by the input stream, or -1 if the length is not known. For HTTP servlets, same as the value of the CGI variable CONTENT_LENGTH.

an integer containing the length of the request body or -1 if the length is not known

What should I expect from this method for content length > 2GB? -1 ? Wrong, because content length is known. If there is somebody from servlet API group, then please clarify.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic