Bug 159898 - m2crypto SSLServer handle_error() vs. SocketServer.TCPServer handle_error()
m2crypto SSLServer handle_error() vs. SocketServer.TCPServer handle_error()
Product: Fedora
Classification: Fedora
Component: m2crypto (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miloslav Trmač
Depends On:
  Show dependency treegraph
Reported: 2005-06-08 17:27 EDT by Dan Williams
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 0.13-5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-06-14 11:01:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Dan Williams 2005-06-08 17:27:25 EDT
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 17:28:12 EDT
Created attachment 115241 [details]
normalize m2crypto's SSLServer.handle_error() function
Comment 2 Miloslav Trmač 2005-06-09 08:01:13 EDT
Fixed in m2crypto-0.13-4. Thanks!
Comment 3 Dan Williams 2005-06-13 13:53:18 EDT
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 13:54:41 EDT
Created attachment 115361 [details]
Define request & client_address first
Comment 5 Miloslav Trmač 2005-06-14 11:01:56 EDT
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.