Restricted from modifying headers?

1 view
Skip to first unread message

Shane

unread,
Jun 13, 2008, 10:57:34 AM6/13/08
to Google App Engine
Does anyone know if GAE restricts you from modifying the headers on a
response?

This code:
self.response.headers["Content-Type"] = "application/octet-
stream"
self.response.headers["Content-Disposition"] = "attachment;
filename=test.jpg"
self.response.out.write(greeting.avatar)

Has the same effect as this code:
self.response.out.write(greeting.avatar)

Normally, doesn't the ["Content-Disposition"| header change force the
user to download the file instead of displaying it in the browser?
Reply all
Reply to author
Forward
0 new messages