Thanks, Ikai. For this to work, it seems like content-length should be
set in the http headers of the request. If this is not set by the
posting client, the question is whether there is a mechanism of
detecting the number of bytes transferred (including header and URL
bytes).

On Jan 28, 4:31 am, "Ikai L (Google)" <ika...@google.com> wrote:
> Are there places where this isn't reliably set? In my servlet I am calling:
>
>         int contentLength = request.getContentLength();
>
> This works with the following form:
>
> <form action="/content_length" method="POST" enctype="multipart/form-data">
> <input type="file" name="somefile" />
> <input type="text" name="sometext" />
> <input type="submit" />
> </form>
>
>
>
> On Mon, Jan 25, 2010 at 3:46 AM, armanuj <arama...@gmail.com> wrote:
> > Hello,
>
> > How can one get the byte size of a http request, esp. in the context
> > of a Java servlet being used in the Google app. engine? Is there a way
> > to do this where the 'Content-Length' is not set (or not reliably set)
> > in the get/post headers?
>
> > Appreciate your help in this.
>
> > Thanks,
> > Arun
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine for Java" group.
> > To post to this group, send email to
> > google-appengine-j...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App 
> Enginehttp://googleappengine.blogspot.com|http://twitter.com/app_engine

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to