Re: [appengine-java] Re: Getting the size of a http request?

2010-02-16 Thread Ikai L (Google)
This data may come from a system outside App Engine before being sent to the
request logs. At any rate, it's not available in an API yet, and would
likely only be in aggregated form or seriously delayed.

At any rate, you may wish to create a feature request and star it:

http://code.google.com/p/googleappengine/issues/list

On Sun, Feb 14, 2010 at 9:48 PM, armanuj  wrote:

> Ok, Thanks, Ikai. I will try this (subject to latency considerations),
> and let you know.
>
> I am assuming GAE tracks the bytes flowing on the wire and log it -
> could there be access to such data from the logs for each request? If
> so, how to enable such logging and how to access such data from the
> logs?
>
> Thanks,
> Arun
>
> On Feb 5, 11:56 pm, "Ikai L (Google)"  wrote:
> > It's not going to be pretty, but you can manually get the size using
> either
> > getInputStream() or getReader() and just iterating until you get to the
> end,
> > incrementing your count by your buffer size each time, then counting the
> > final result:
> >
> > http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/Servle...
> >
> >
> >
> > On Fri, Feb 5, 2010 at 3:37 AM, armanuj  wrote:
> > > One more clarification: in my get or post request, there is no file
> > > upload involved. I just want the total number of bytes transferred in
> > > a GET or a form-based POST request, and this is done by our custom
> > > client application (and not the browser).
> >
> > > Thanks,
> > > Arun
> >
> > > On Jan 28, 4:31 am, "Ikai L (Google)"  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:
> >
> > > >  > > enctype="multipart/form-data">
> > > > 
> > > > 
> > > > 
> > > > 
> >
> > > > On Mon, Jan 25, 2010 at 3:46 AM, armanuj  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
> 
> >
> > > 
> 
> >
> >
> > > > > .
> > > > > 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.
> >
> > --
> > 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.
>
>


-- 
Ikai Lan
Developer Programs Engineer, Google App Engine
http://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.



[appengine-java] Re: Getting the size of a http request?

2010-02-14 Thread armanuj
Ok, Thanks, Ikai. I will try this (subject to latency considerations),
and let you know.

I am assuming GAE tracks the bytes flowing on the wire and log it -
could there be access to such data from the logs for each request? If
so, how to enable such logging and how to access such data from the
logs?

Thanks,
Arun

On Feb 5, 11:56 pm, "Ikai L (Google)"  wrote:
> It's not going to be pretty, but you can manually get the size using either
> getInputStream() or getReader() and just iterating until you get to the end,
> incrementing your count by your buffer size each time, then counting the
> final result:
>
> http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/Servle...
>
>
>
> On Fri, Feb 5, 2010 at 3:37 AM, armanuj  wrote:
> > One more clarification: in my get or post request, there is no file
> > upload involved. I just want the total number of bytes transferred in
> > a GET or a form-based POST request, and this is done by our custom
> > client application (and not the browser).
>
> > Thanks,
> > Arun
>
> > On Jan 28, 4:31 am, "Ikai L (Google)"  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:
>
> > >  > enctype="multipart/form-data">
> > > 
> > > 
> > > 
> > > 
>
> > > On Mon, Jan 25, 2010 at 3:46 AM, armanuj  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
> > 
>
> > > > .
> > > > 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.
>
> --
> 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.



Re: [appengine-java] Re: Getting the size of a http request?

2010-02-05 Thread Ikai L (Google)
It's not going to be pretty, but you can manually get the size using either
getInputStream() or getReader() and just iterating until you get to the end,
incrementing your count by your buffer size each time, then counting the
final result:

http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletRequest.html

On Fri, Feb 5, 2010 at 3:37 AM, armanuj  wrote:

> One more clarification: in my get or post request, there is no file
> upload involved. I just want the total number of bytes transferred in
> a GET or a form-based POST request, and this is done by our custom
> client application (and not the browser).
>
> Thanks,
> Arun
>
> On Jan 28, 4:31 am, "Ikai L (Google)"  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:
> >
> >  enctype="multipart/form-data">
> > 
> > 
> > 
> > 
> >
> >
> >
> > On Mon, Jan 25, 2010 at 3:46 AM, armanuj  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
> 
> >
> > > .
> > > 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.
>
>


-- 
Ikai Lan
Developer Programs Engineer, Google App Engine
http://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.



[appengine-java] Re: Getting the size of a http request?

2010-02-05 Thread armanuj
One more clarification: in my get or post request, there is no file
upload involved. I just want the total number of bytes transferred in
a GET or a form-based POST request, and this is done by our custom
client application (and not the browser).

Thanks,
Arun

On Jan 28, 4:31 am, "Ikai L (Google)"  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:
>
> 
> 
> 
> 
> 
>
>
>
> On Mon, Jan 25, 2010 at 3:46 AM, armanuj  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
> > .
> > 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.



[appengine-java] Re: Getting the size of a http request?

2010-02-05 Thread armanuj
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)"  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:
>
> 
> 
> 
> 
> 
>
>
>
> On Mon, Jan 25, 2010 at 3:46 AM, armanuj  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
> > .
> > 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.