Content-length Header Not Being Set On Flask App Engine Response For Served Blob
In my Flask-based Google App Engine server, I am trying to return a response with a 'content-length' header which will contain the final size of a blob being served to the client.
Solution 1:
The Content-Length
header is included in the list of headers that can't be modified.
As you and the documentation pointed out, App Engine calculates the Content-Length header from the request data and adds it to the request prior to sending.
You can always set a personalized header, Flask allows it, and GAE will let you use it.
For example, for your response:
response.headers['CL-blob'] = blobstore.BlobInfo(version.blob_key).size
Post a Comment for "Content-length Header Not Being Set On Flask App Engine Response For Served Blob"