You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Jeff Potts (JIRA)" <ji...@apache.org> on 2010/07/12 22:56:54 UTC

[jira] Created: (CMIS-236) CmisClientTest.testCmisClientBadAuth will cause python runtime error

CmisClientTest.testCmisClientBadAuth will cause python runtime error
--------------------------------------------------------------------

                 Key: CMIS-236
                 URL: https://issues.apache.org/jira/browse/CMIS-236
             Project: Chemistry
          Issue Type: Bug
          Components: cmislib
            Reporter: Jeff Potts
            Assignee: Jeff Potts


Migrated from GC issue 15, Reported by niyue.com, Mar 29, 2010

Because incorrect password is used, 401 response will be return from
server, but it seems there's some client issue causing a recursive
redirection and finally leading to a runtime error. Tested against Alfresco
hosted service "http://cmis.alfresco.com/s/cmis".
{{{
File "C:\Python26\lib\urllib2.py", line 855, in http_error_401
  url, req, headers)
File "C:\Python26\lib\urllib2.py", line 833, in http_error_auth_reqed
  return self.retry_http_basic_auth(host, req, realm)
File "C:\Python26\lib\urllib2.py", line 843, in retry_http_basic_auth
  return self.parent.open(req, timeout=req.timeout)
File "C:\Python26\lib\urllib2.py", line 391, in open
  response = self._open(req, data)
File "C:\Python26\lib\urllib2.py", line 409, in _open
  '_open', req)
File "C:\Python26\lib\urllib2.py", line 369, in _call_chain
  result = func(*args)
File "C:\Python26\lib\urllib2.py", line 1161, in http_open
  return self.do_open(httplib.HTTPConnection, req)
File "C:\Python26\lib\urllib2.py", line 1133, in do_open
  h.request(req.get_method(), req.get_selector(), req.data, headers)
File "C:\Python26\lib\httplib.py", line 910, in request
  self._send_request(method, url, body, headers)
File "C:\Python26\lib\httplib.py", line 947, in _send_request
  self.endheaders()
File "C:\Python26\lib\httplib.py", line 904, in endheaders
  self._send_output()
File "C:\Python26\lib\httplib.py", line 776, in _send_output
  self.send(msg)
File "C:\Python26\lib\httplib.py", line 735, in send
  self.connect()
File "C:\Python26\lib\httplib.py", line 716, in connect
  self.timeout)
File "C:\Python26\lib\socket.py", line 504, in create_connection
  sock = socket(af, socktype, proto)
RuntimeError: maximum recursion depth exceeded while calling a Python object
}}}


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CMIS-236) CmisClientTest.testCmisClientBadAuth will cause python runtime error

Posted by "Jeff Potts (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887921#action_12887921 ] 

Jeff Potts commented on CMIS-236:
---------------------------------

Okay, this definitely happens on Windows, but not Mac OS X. I can reproduce it using straight urllib2 example code so this isn't a cmislib issue. However, if someone knows something I can do to defend against it in my code, I'm happy to include it.

> CmisClientTest.testCmisClientBadAuth will cause python runtime error
> --------------------------------------------------------------------
>
>                 Key: CMIS-236
>                 URL: https://issues.apache.org/jira/browse/CMIS-236
>             Project: Chemistry
>          Issue Type: Bug
>          Components: cmislib
>            Reporter: Jeff Potts
>            Assignee: Jeff Potts
>
> Migrated from GC issue 15, Reported by niyue.com, Mar 29, 2010
> Because incorrect password is used, 401 response will be return from
> server, but it seems there's some client issue causing a recursive
> redirection and finally leading to a runtime error. Tested against Alfresco
> hosted service "http://cmis.alfresco.com/s/cmis".
> {{{
> File "C:\Python26\lib\urllib2.py", line 855, in http_error_401
>   url, req, headers)
> File "C:\Python26\lib\urllib2.py", line 833, in http_error_auth_reqed
>   return self.retry_http_basic_auth(host, req, realm)
> File "C:\Python26\lib\urllib2.py", line 843, in retry_http_basic_auth
>   return self.parent.open(req, timeout=req.timeout)
> File "C:\Python26\lib\urllib2.py", line 391, in open
>   response = self._open(req, data)
> File "C:\Python26\lib\urllib2.py", line 409, in _open
>   '_open', req)
> File "C:\Python26\lib\urllib2.py", line 369, in _call_chain
>   result = func(*args)
> File "C:\Python26\lib\urllib2.py", line 1161, in http_open
>   return self.do_open(httplib.HTTPConnection, req)
> File "C:\Python26\lib\urllib2.py", line 1133, in do_open
>   h.request(req.get_method(), req.get_selector(), req.data, headers)
> File "C:\Python26\lib\httplib.py", line 910, in request
>   self._send_request(method, url, body, headers)
> File "C:\Python26\lib\httplib.py", line 947, in _send_request
>   self.endheaders()
> File "C:\Python26\lib\httplib.py", line 904, in endheaders
>   self._send_output()
> File "C:\Python26\lib\httplib.py", line 776, in _send_output
>   self.send(msg)
> File "C:\Python26\lib\httplib.py", line 735, in send
>   self.connect()
> File "C:\Python26\lib\httplib.py", line 716, in connect
>   self.timeout)
> File "C:\Python26\lib\socket.py", line 504, in create_connection
>   sock = socket(af, socktype, proto)
> RuntimeError: maximum recursion depth exceeded while calling a Python object
> }}}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CMIS-236) CmisClientTest.testCmisClientBadAuth will cause python runtime error

Posted by "Patrice Collardez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901329#action_12901329 ] 

Patrice Collardez commented on CMIS-236:
----------------------------------------

It looks like a Python 2.6.5 issue: http://bugs.python.org/issue8797.

> CmisClientTest.testCmisClientBadAuth will cause python runtime error
> --------------------------------------------------------------------
>
>                 Key: CMIS-236
>                 URL: https://issues.apache.org/jira/browse/CMIS-236
>             Project: Chemistry
>          Issue Type: Bug
>          Components: cmislib
>            Reporter: Jeff Potts
>            Assignee: Jeff Potts
>
> Migrated from GC issue 15, Reported by niyue.com, Mar 29, 2010
> Because incorrect password is used, 401 response will be return from
> server, but it seems there's some client issue causing a recursive
> redirection and finally leading to a runtime error. Tested against Alfresco
> hosted service "http://cmis.alfresco.com/s/cmis".
> {{{
> File "C:\Python26\lib\urllib2.py", line 855, in http_error_401
>   url, req, headers)
> File "C:\Python26\lib\urllib2.py", line 833, in http_error_auth_reqed
>   return self.retry_http_basic_auth(host, req, realm)
> File "C:\Python26\lib\urllib2.py", line 843, in retry_http_basic_auth
>   return self.parent.open(req, timeout=req.timeout)
> File "C:\Python26\lib\urllib2.py", line 391, in open
>   response = self._open(req, data)
> File "C:\Python26\lib\urllib2.py", line 409, in _open
>   '_open', req)
> File "C:\Python26\lib\urllib2.py", line 369, in _call_chain
>   result = func(*args)
> File "C:\Python26\lib\urllib2.py", line 1161, in http_open
>   return self.do_open(httplib.HTTPConnection, req)
> File "C:\Python26\lib\urllib2.py", line 1133, in do_open
>   h.request(req.get_method(), req.get_selector(), req.data, headers)
> File "C:\Python26\lib\httplib.py", line 910, in request
>   self._send_request(method, url, body, headers)
> File "C:\Python26\lib\httplib.py", line 947, in _send_request
>   self.endheaders()
> File "C:\Python26\lib\httplib.py", line 904, in endheaders
>   self._send_output()
> File "C:\Python26\lib\httplib.py", line 776, in _send_output
>   self.send(msg)
> File "C:\Python26\lib\httplib.py", line 735, in send
>   self.connect()
> File "C:\Python26\lib\httplib.py", line 716, in connect
>   self.timeout)
> File "C:\Python26\lib\socket.py", line 504, in create_connection
>   sock = socket(af, socktype, proto)
> RuntimeError: maximum recursion depth exceeded while calling a Python object
> }}}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CMIS-236) CmisClientTest.testCmisClientBadAuth will cause python runtime error

Posted by "Patrice Collardez (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CMIS-236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrice Collardez updated CMIS-236:
-----------------------------------

    Attachment: cmislib_net_236_workaround.patch

Here is a quick (and probably dirty) workaround tested on Windows.
I tried to keep the intented behaviour introduced in Python 2.6.5 (401 redirects for specific architectures of authentication).

> CmisClientTest.testCmisClientBadAuth will cause python runtime error
> --------------------------------------------------------------------
>
>                 Key: CMIS-236
>                 URL: https://issues.apache.org/jira/browse/CMIS-236
>             Project: Chemistry
>          Issue Type: Bug
>          Components: cmislib
>            Reporter: Jeff Potts
>            Assignee: Jeff Potts
>         Attachments: cmislib_net_236_workaround.patch
>
>
> Migrated from GC issue 15, Reported by niyue.com, Mar 29, 2010
> Because incorrect password is used, 401 response will be return from
> server, but it seems there's some client issue causing a recursive
> redirection and finally leading to a runtime error. Tested against Alfresco
> hosted service "http://cmis.alfresco.com/s/cmis".
> {{{
> File "C:\Python26\lib\urllib2.py", line 855, in http_error_401
>   url, req, headers)
> File "C:\Python26\lib\urllib2.py", line 833, in http_error_auth_reqed
>   return self.retry_http_basic_auth(host, req, realm)
> File "C:\Python26\lib\urllib2.py", line 843, in retry_http_basic_auth
>   return self.parent.open(req, timeout=req.timeout)
> File "C:\Python26\lib\urllib2.py", line 391, in open
>   response = self._open(req, data)
> File "C:\Python26\lib\urllib2.py", line 409, in _open
>   '_open', req)
> File "C:\Python26\lib\urllib2.py", line 369, in _call_chain
>   result = func(*args)
> File "C:\Python26\lib\urllib2.py", line 1161, in http_open
>   return self.do_open(httplib.HTTPConnection, req)
> File "C:\Python26\lib\urllib2.py", line 1133, in do_open
>   h.request(req.get_method(), req.get_selector(), req.data, headers)
> File "C:\Python26\lib\httplib.py", line 910, in request
>   self._send_request(method, url, body, headers)
> File "C:\Python26\lib\httplib.py", line 947, in _send_request
>   self.endheaders()
> File "C:\Python26\lib\httplib.py", line 904, in endheaders
>   self._send_output()
> File "C:\Python26\lib\httplib.py", line 776, in _send_output
>   self.send(msg)
> File "C:\Python26\lib\httplib.py", line 735, in send
>   self.connect()
> File "C:\Python26\lib\httplib.py", line 716, in connect
>   self.timeout)
> File "C:\Python26\lib\socket.py", line 504, in create_connection
>   sock = socket(af, socktype, proto)
> RuntimeError: maximum recursion depth exceeded while calling a Python object
> }}}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CMIS-236) CmisClientTest.testCmisClientBadAuth will cause python runtime error

Posted by "Jeff Potts (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887836#action_12887836 ] 

Jeff Potts commented on CMIS-236:
---------------------------------

I cannot reproduce this on Alfresco 3.3g Community locally or on hosted Alfresco CMIS using Mac OS X.

Reporter looks to be using Windows. I may try that if I get a chance.

> CmisClientTest.testCmisClientBadAuth will cause python runtime error
> --------------------------------------------------------------------
>
>                 Key: CMIS-236
>                 URL: https://issues.apache.org/jira/browse/CMIS-236
>             Project: Chemistry
>          Issue Type: Bug
>          Components: cmislib
>            Reporter: Jeff Potts
>            Assignee: Jeff Potts
>
> Migrated from GC issue 15, Reported by niyue.com, Mar 29, 2010
> Because incorrect password is used, 401 response will be return from
> server, but it seems there's some client issue causing a recursive
> redirection and finally leading to a runtime error. Tested against Alfresco
> hosted service "http://cmis.alfresco.com/s/cmis".
> {{{
> File "C:\Python26\lib\urllib2.py", line 855, in http_error_401
>   url, req, headers)
> File "C:\Python26\lib\urllib2.py", line 833, in http_error_auth_reqed
>   return self.retry_http_basic_auth(host, req, realm)
> File "C:\Python26\lib\urllib2.py", line 843, in retry_http_basic_auth
>   return self.parent.open(req, timeout=req.timeout)
> File "C:\Python26\lib\urllib2.py", line 391, in open
>   response = self._open(req, data)
> File "C:\Python26\lib\urllib2.py", line 409, in _open
>   '_open', req)
> File "C:\Python26\lib\urllib2.py", line 369, in _call_chain
>   result = func(*args)
> File "C:\Python26\lib\urllib2.py", line 1161, in http_open
>   return self.do_open(httplib.HTTPConnection, req)
> File "C:\Python26\lib\urllib2.py", line 1133, in do_open
>   h.request(req.get_method(), req.get_selector(), req.data, headers)
> File "C:\Python26\lib\httplib.py", line 910, in request
>   self._send_request(method, url, body, headers)
> File "C:\Python26\lib\httplib.py", line 947, in _send_request
>   self.endheaders()
> File "C:\Python26\lib\httplib.py", line 904, in endheaders
>   self._send_output()
> File "C:\Python26\lib\httplib.py", line 776, in _send_output
>   self.send(msg)
> File "C:\Python26\lib\httplib.py", line 735, in send
>   self.connect()
> File "C:\Python26\lib\httplib.py", line 716, in connect
>   self.timeout)
> File "C:\Python26\lib\socket.py", line 504, in create_connection
>   sock = socket(af, socktype, proto)
> RuntimeError: maximum recursion depth exceeded while calling a Python object
> }}}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CMIS-236) CmisClientTest.testCmisClientBadAuth will cause python runtime error

Posted by "Jeff Potts (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CMIS-236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Potts resolved CMIS-236.
-----------------------------

    Resolution: Fixed

Applied patch and checked in. Thanks for the patch, Patrice!

> CmisClientTest.testCmisClientBadAuth will cause python runtime error
> --------------------------------------------------------------------
>
>                 Key: CMIS-236
>                 URL: https://issues.apache.org/jira/browse/CMIS-236
>             Project: Chemistry
>          Issue Type: Bug
>          Components: cmislib
>            Reporter: Jeff Potts
>            Assignee: Jeff Potts
>         Attachments: cmislib_net_236_workaround.patch
>
>
> Migrated from GC issue 15, Reported by niyue.com, Mar 29, 2010
> Because incorrect password is used, 401 response will be return from
> server, but it seems there's some client issue causing a recursive
> redirection and finally leading to a runtime error. Tested against Alfresco
> hosted service "http://cmis.alfresco.com/s/cmis".
> {{{
> File "C:\Python26\lib\urllib2.py", line 855, in http_error_401
>   url, req, headers)
> File "C:\Python26\lib\urllib2.py", line 833, in http_error_auth_reqed
>   return self.retry_http_basic_auth(host, req, realm)
> File "C:\Python26\lib\urllib2.py", line 843, in retry_http_basic_auth
>   return self.parent.open(req, timeout=req.timeout)
> File "C:\Python26\lib\urllib2.py", line 391, in open
>   response = self._open(req, data)
> File "C:\Python26\lib\urllib2.py", line 409, in _open
>   '_open', req)
> File "C:\Python26\lib\urllib2.py", line 369, in _call_chain
>   result = func(*args)
> File "C:\Python26\lib\urllib2.py", line 1161, in http_open
>   return self.do_open(httplib.HTTPConnection, req)
> File "C:\Python26\lib\urllib2.py", line 1133, in do_open
>   h.request(req.get_method(), req.get_selector(), req.data, headers)
> File "C:\Python26\lib\httplib.py", line 910, in request
>   self._send_request(method, url, body, headers)
> File "C:\Python26\lib\httplib.py", line 947, in _send_request
>   self.endheaders()
> File "C:\Python26\lib\httplib.py", line 904, in endheaders
>   self._send_output()
> File "C:\Python26\lib\httplib.py", line 776, in _send_output
>   self.send(msg)
> File "C:\Python26\lib\httplib.py", line 735, in send
>   self.connect()
> File "C:\Python26\lib\httplib.py", line 716, in connect
>   self.timeout)
> File "C:\Python26\lib\socket.py", line 504, in create_connection
>   sock = socket(af, socktype, proto)
> RuntimeError: maximum recursion depth exceeded while calling a Python object
> }}}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.