Same behaviour using Ubuntu 8.10, webpy 0.31, python 2.6.
I ask for the problem to cherrypy group, but they explained only the
error meaning.


Dusty Phillips ha scritto:

> I'm getting incorrect behaviour when accessing an HTTPS request via
> HTTP with the cherrypy wsgiserver. I've configured it to use SSL like
> so:
>
>       CherryPyWSGIServer.ssl_certificate=os.path.join(app_dir,
> "mycert.crt")
>       CherryPyWSGIServer.ssl_private_key=os.path.join(app_dir,
> "mycert.key")
>
> If I access my web.py resource using https:// everything works fine.
> However, if I use http:// I expect it to gracefully return a 400 Bad
> Request response. Instead, I get the following traceback, and the
> browser receives no data:
>
> Exception in thread CP WSGIServer Thread-1:
> Traceback (most recent call last):
>   File "...python/lib/python2.6/threading.py", line 522, in
> __bootstrap_inner
>     self.run()
>   File "...python/lib/python2.6/site-packages/web.py-0.31-py2.6.egg/
> web/wsgiserver/__init__.py", line 1261, in run
>     conn.communicate()
>   File "...python/lib/python2.6/site-packages/web.py-0.31-py2.6.egg/
> web/wsgiserver/__init__.py", line 1199, in communicate
>     "The client sent a plain HTTP request, but "
>   File "...python/lib/python2.6/site-packages/web.py-0.31-py2.6.egg/
> web/wsgiserver/__init__.py", line 595, in simple_response
>     self.wfile.sendall("".join(buf))
>   File "...python/lib/python2.6/site-packages/web.py-0.31-py2.6.egg/
> web/wsgiserver/__init__.py", line 730, in sendall
>     bytes_sent = self.send(data)
>   File "...python/lib/python2.6/site-packages/web.py-0.31-py2.6.egg/
> web/wsgiserver/__init__.py", line 737, in send
>     return self._sock.send(data)
> Error: [('SSL routines', 'SSL23_GET_CLIENT_HELLO', 'http request')]
>
> I followed the trace and communicate() appears to be trying to send
> the 400 bad request, but when it gets sent out in _sock.send, it is
> still trying to talk SSL. Is this a bug in the wsgiserver, or is it
> something on my side?
>
> I'm using web.py 0.31 and python2.6 under MacOS 10.5. I'm pretty sure
> this was working correctly under web.py 0.23, but I don't know when
> this problem started to manifest itself or if it was caused by
> upgrading to 0.3[1] or some change I've made internally. Does anyone
> have any ideas?
>
> Thanks
> Dusty
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to webpy@googlegroups.com
To unsubscribe from this group, send email to webpy+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to