i'm trying send compressed file through appengine, function
func handlewebglrequest(w http.responsewriter, r *http.request) { c := appengine.newcontext(r) blobkey, err := blobstore.blobkeyforfile(c, "/gs/<path>/webgl.datagz") if err != nil { fmt.fprintf(w, "problem: cannot find webgl.data") return } w.header().set("content-type", "blah/blah/application/octet-stream") w.header().set("content-encoding", "gzip") blobstore.send(w, blobkey) }
the file sent, content-type appears correctly in response header "blah/blah/application/octet-stream", content-encoding never in response header, (i think) cause of other issues i'm having.
does know why doesn't work?
(in case matters - i'm using chrome inspector view response headers, , here is, source not parsed
http/1.1 200 ok content-type: blah/blah/application/octet-stream transfer-encoding: chunked date: tue, 28 apr 2015 06:50:09 gmt server: google frontend alternate-protocol: 80:quic,p=1)
much appreciated
you can't control header, servers try serve gzipped content possible, long they're confident browser support it.
how serve compressed content?
google app engine best serve gzipped content browsers support it. taking advantage of scheme automatic , requires no modifications applications.