On Tuesday, August 31, 2010 15:53:47 David wrote:
> I'm trying to send a string of binary data as a parameter into a
> controller. My problem is that TG 2.1 seems to re-encode the data into
> a unicode string, and '\xFF' characters in particular get messed up.
> I'd like to disable the parameter decoding for just one parameter
> (preferably not the whole controller). Is that possible?

No. But using multipart/form-data encoded POSTs is the way to go there anyway, 
and then you get the parameter in question as file-stream.

If that's not possible for you, the other options is to install a custom 
middleware in front which - for specific requests - uses a webob.Request-object 
around the environ to access the parameter as raw string (which Request 
supports), and stuff it under a specific key into the environ.

Oh, and there is always of course base64. En/Decoding that should even be no 
issue with javascript.

Diez

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en.

Reply via email to