google app engine - why my app reaches GAE `Incoming Bandwidth` while it just fetches tiny content -


my app use urllib2 fetch remote http file. not fetch whole file, read 5 bytes it. purposely save quota. line 'content = remotefilefh.read(5)' below does.

def httpgetfile(self,remotefile):         print 'downloading %s...'%remotefile,     remotefilefh = urllib2.urlopen(remotefile)     content = remotefilefh.read(5)     print 'content:%s' % content     remotefilefh.close()     print 'done.' 

but seems still consume 'incoming bandwidth' fetching whole file. why? how google host service calculate that?

the urlfetch service doesn't support fetching partial content. on app engine, urllib2 wrapper on urlfetch, whole response fetched , made available application whether read or not.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -