Disabling chunked transfer for blobstore requests

Visto 74 veces
Saltar al primer mensaje no leído

Adrian Holovaty

no leída,
6 abr 2010, 22:28:566/4/10
a Google App Engine
Hi there,

When Google App Engine serves media files from the Blobstore, it sends
a "Transfer-Encoding: chunked" header and doesn't include a "Content-
Length" header. This means a client downloading the file cannot do
useful things such as displaying a progress bar, because the client
doesn't know how large the file is until the whole thing is
downloaded.

My gut reaction upon seeing this was that Google was doing this for
performance reasons, so that it didn't ever have to calculate the size
of each blob... But, Google already *knows* the size -- it's
accessible via Blobinfo.size for any given blob.

In my particular case, I'd love App Engine to set Content-Length so I
can display a download progress bar. I tried manually setting the
Content-Length header (along with the magic X-AppEngine-BlobKey
header) when serving a blob, but Content-Length was silently removed
before it reached the client. So evidently App Engine is intentionally
disallowing this.

Is there any way to disable chunked transfer for blobs? Looks like
somebody asked this in September 2008 but nobody responded:
http://groups.google.com/group/google-appengine/browse_thread/thread/14c976299c032565/

If there isn't a way to accomplish this, I'd love to hear Google's
reasoning, if only because it'd be interesting to hear why App Engine
always uses Transfer-Encoding.

Thanks,
Adrian

Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos