Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 159898 - m2crypto SSLServer handle_error() vs. SocketServer.TCPServer handle_error()
Summary: m2crypto SSLServer handle_error() vs. SocketServer.TCPServer handle_error()
Alias: None
Product: Fedora
Classification: Fedora
Component: m2crypto
Version: 4
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Miloslav Trmač
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-06-08 21:27 UTC by Dan Williams
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: 0.13-5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-06-14 15:01:56 UTC

Attachments (Terms of Use)
normalize m2crypto's SSLServer.handle_error() function (deleted)
2005-06-08 21:28 UTC, Dan Williams
no flags Details | Diff
Define request & client_address first (deleted)
2005-06-13 17:54 UTC, Dan Williams
no flags Details | Diff

Description Dan Williams 2005-06-08 21:27:25 UTC
If one tries to use m2crypto's ThreadingSSLServer (which uses
SocketServer.TCPServer with the ThreadingMixIn) and experiences an error of any
kind during request processing (triggered from here):

            self.finish_request(request, client_address)
            self.handle_error(request, client_address)

handle_error(request, client_address) will be called.  That resolves to
SSLServer.handle_error(), which looks like this:

    def handle_error(self):
        print '-'*40
        import traceback
        print '-'*40

Python complains that SSLServer.handle_error() takes only 1 argument, but was
given 3 arguments.

Comment 1 Dan Williams 2005-06-08 21:28:12 UTC
Created attachment 115241 [details]
normalize m2crypto's SSLServer.handle_error() function

Comment 2 Miloslav Trmač 2005-06-09 12:01:13 UTC
Fixed in m2crypto-0.13-4. Thanks!

Comment 3 Dan Williams 2005-06-13 17:53:18 UTC
My previous patch was slightly incomplete.  Turns out we need to set (request,
client_address) to None before we enter the try: block, otherwise they may not
be defined yet during an Exception.

Updated patch attached.

Comment 4 Dan Williams 2005-06-13 17:54:41 UTC
Created attachment 115361 [details]
Define request & client_address first

Comment 5 Miloslav Trmač 2005-06-14 15:01:56 UTC
Built in m2crypto-0.13-5, thanks again.

Note You need to log in before you can comment on or make changes to this bug.