Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(176)

Issue 4532054: https: correctly handle SSL_WANT_READ conditions

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 11 months ago by Augie fackler
Modified:
8 years, 4 months ago
Reviewers:
parren
CC:
bboissin
Visibility:
Public.

Description

I've got a corresponding changeset for Mercurial if you want to test there, or just apply the diff for http/__init__.py. https: correctly handle SSL_WANT_READ conditions This used to break on Python 2.6, and now it won't. The Python 2.4 codepath probably can be cleaned up some, but that can wait until a future changeset. tests.util.mocksslwrap now returns a MockSSLSocket, which claims to require more data from the wire on every other read operation. REV=b8c3511a8cae

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -10 lines) Patch
M http/__init__.py View 2 chunks +15 lines, -2 lines 1 comment Download
M http/tests/simple_http_test.py View 1 chunk +1 line, -1 line 0 comments Download
M http/tests/test_proxy_support.py View 1 chunk +6 lines, -6 lines 0 comments Download
A http/tests/test_ssl.py View 1 chunk +94 lines, -0 lines 0 comments Download
M http/tests/util.py View 1 chunk +18 lines, -1 line 0 comments Download

Messages

Total messages: 5
parren
Works for me. http://codereview.appspot.com/4532054/diff/1/http/__init__.py File http/__init__.py (right): http://codereview.appspot.com/4532054/diff/1/http/__init__.py#newcode554 http/__init__.py:554: try: SSL_WANT_READ while *sending* data is ...
12 years, 11 months ago (2011-05-12 19:36:56 UTC) #1
bboissin
By the way, can there be an issue with WANT_WRITE as well? Benoit On Thu, ...
12 years, 11 months ago (2011-05-12 19:39:52 UTC) #2
parren
On Thu, May 12, 2011 at 9:39 PM, Benoit Boissinot <bboissin@gmail.com> wrote: > By the ...
12 years, 11 months ago (2011-05-12 19:44:01 UTC) #3
Augie fackler
On Thu, May 12, 2011 at 2:39 PM, Benoit Boissinot <bboissin@gmail.com> wrote: > By the ...
12 years, 11 months ago (2011-05-12 20:15:21 UTC) #4
Augie fackler
12 years, 11 months ago (2011-05-17 19:19:21 UTC) #5
On May 12, 2011, at 2:43 PM, Peter Arrenbrecht wrote:
> 
> On Thu, May 12, 2011 at 9:39 PM, Benoit Boissinot <bboissin@gmail.com> wrote:
>> By the way, can there be an issue with WANT_WRITE as well?
> 
> Sounds like it:
> 
>
http://stackoverflow.com/questions/3952104/how-to-handle-openssl-ssl-error-wa...

In looking, there's already code to handle that case, which is probably why we
haven't seen it.

> 
> -parren
> 
>> 
>> On Thu, May 12, 2011 at 9:36 PM,  <peter.arrenbrecht@gmail.com> wrote:
>>> Works for me.
>>> 
>>> 
>>> http://codereview.appspot.com/4532054/diff/1/http/__init__.py
>>> File http/__init__.py (right):
>>> 
>>> http://codereview.appspot.com/4532054/diff/1/http/__init__.py#newcode554
>>> http/__init__.py:554: try:
>>> SSL_WANT_READ while *sending* data is a bit surprising, but well.
>>> 
>>> http://codereview.appspot.com/4532054/
>>> 
>> 


Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b