Hmm, this seems strange to me.  How can it be guaranteed that the remote
filename is a utf-8 encoded byte string?  Not sure this should be done
this way anyhow.

- Rocky


On Mon, 2006-19-06 at 11:01 +0200, Adam Groszer wrote:
> Hi Marius,
> 
> Your fix of browser.py causes problems for me using hurry.file when
> running functional test with zope.testbrowser.
> The problem is that aFieldStorage.filename is already unicode and it
> cannot be decoded again.
> 
> Do you mind if I add an
> if isinstance(aFieldStorage.filename, unicode):
> construct?
> 
> Modified: Zope3/trunk/src/zope/publisher/browser.py
> ===================================================================
> --- Zope3/trunk/src/zope/publisher/browser.py2006-06-13 22:00:47 UTC (rev 
> 68625)
> +++ Zope3/trunk/src/zope/publisher/browser.py2006-06-14 12:25:49 UTC (rev 
> 68626)
> @@ -596,7 +596,7 @@
>                  d[m] = getattr(file,m)
>  
>          self.headers = aFieldStorage.headers
> -        self.filename = aFieldStorage.filename
> +        self.filename = unicode(aFieldStorage.filename, 'UTF-8')
>  
>  class RedirectingBrowserRequest(BrowserRequest):
>      """Browser requests that redirect when the actual and effective URLs 
> differ  
> 
-- 
Rocky Burt
ServerZen Software -- http://www.serverzen.com
News About The Server (blog) -- http://www.serverzen.net

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to