In production.  I don't know if they happen in the dev app server or not.  I 
found it because a page that had been working, suddenly stopped working.

On Dec 3, 2010, at 1:23 PM, Ikai Lan (Google) wrote:

> Interesting. Let me ask about this change. Did you observe this behavior only 
> in production or in the dev app server?
> 
> --
> Ikai Lan 
> Developer Programs Engineer, Google App Engine
> Blogger: http://googleappengine.blogspot.com
> Reddit: http://www.reddit.com/r/appengine
> Twitter: http://twitter.com/app_engine
> 
> 
> 
> On Fri, Dec 3, 2010 at 7:00 AM, Joshua Smith <[email protected]> wrote:
> FYI:
> 
> In several places in my apps, I allow people to download CSV file, and I 
> generate the name of those files dynamically:
> 
>     self.response.headers["Content-Type"] = "application/x-download"
>     self.response.headers["Content-Disposition"] = "attachment;filename=%s 
> CDN.csv" % client.name
> 
> This used to work just fine, but with the 1.4.0 release, that generates this 
> error:
> 
> 
> AssertionError: Header values must be strings
> This was easily fixed by forcing the header value to NOT be unicode:
> 
>     self.response.headers["Content-Type"] = "application/x-download"
>     self.response.headers["Content-Disposition"] = 
> str("attachment;filename=%s CDN.csv" % client.name)
> 
> Clearly, the old code was technically wrong, although in my case, it wouldn't 
> have ever been an issue.
> 
> I recommend that you search for the pattern: headers.*%s in your source code, 
> so you don't get bit by this new assertion!
> 
> -Joshua
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to