ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> zope-Dev
zope-Dev
Re: [Zope-dev] Accept-Charset hearders causing 500 internal server error.[correct but not lenient]
by Florent Guillaume other posts by this author
Jan 30 2003 3:45PM messages near this date
Re: [Zope-dev] consistently getting conflicterrors on 'intSet' | [Zope-dev] Re: [Zope-Coders] FYI: Zope 2.6.1 b2 scheduled for friday
Ooops, typo in the list name :-)
---

To: romain@[...].com
Cc: nuxeo-localizer@[...].org, zope-dev@[...].org
Subject: Re: [Zope-dev] Accept-Charset hearders causing 500 internal server error.[correct  
but not lenient]
Date: 30 Jan 2003 16:38:20 +0100

That's actually a bug in Localizer. In Accept.py, the Root.parse method
is not flexible enough... I haven't time to fix it right away so someone
else feel free to do it...

Florent

In article <3E37D0B7.6040801@[...].nl>  you write:
>  Hi,
>  
>  We have problems with the Accept-Charset headers that are sent to the 
>  zope server by some mobile phones:
>  fi:
>  'Accept-Charset':'ISO-8859-1, US-ASCII, UTF-8; Q=0.8'
>  
>  These cause a 500 internal server error. (Error Value: invalid literal 
>  for float(): =0.8 )
>  
>  I checked with the HTTP1.1 RFC26160 section 14.2 and the header seems 
>  valid, but in fact isn't:
>  there is a space between the semi-colon and the Q char (which shouldn't 
>  be there acoording to the spec).
>  
>  So, in principle, this is not a zope server bug, but an inflexibility.
>  
>  I think the server should be a bit more lenient.
>  a simple .strip() in the right place should do.
>  
>  Could you guys fix this?
>  
>  TIA,
>  
>  Sloot.
>  
>  
>  
>  
>  BTW, for completeness, I included a quick test program is included below 
>  (causes a 500 on my zope 2.6.0) :
>  
>  
>  
>  #--------------------- program illustrating the behavior -----------
>  import httplib, urllib
>  
>  def sendHTTP():
>       """
>  
>       """
>       headers = {'Accept':
>                  'application/vnd.wap.wmlc, 
>  application/vnd.wap.wmlscriptc, application/vnd.wap.wbxml, 
>  image/vnd.wap.wbmp, image/gif, application/*, text/html, 
>  application/xhtml+xml, application/vnd.wap.wml+xml, text/css',
>                  'Accept-Charset':'ISO-8859-1, US-ASCII, UTF-8; Q=0.8'}#, 
>  ISO-10646-UCS-2; Q=0.6'
>       conn = httplib.HTTPConnection("127.0.0.1:8080")
>       conn.request("GET", "/mobile/wap/games/",headers=headers)
>       response = conn.getresponse()
>       print response.status, response.reason
>       data = response.read()
>       print data
>  
>       conn.close()
>  
>  sendHTTP()

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@[...].com


_______________________________________________
Zope-Dev maillist  -  Zope-Dev@[...].org
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved