kmonsoor / pyfilesystem

Automatically exported from code.google.com/p/pyfilesystem
0 stars 0 forks source link

use stdlib HTTPPasswordMgr for DAVFS #64

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently, the contributed webdav FS implements authentication adhoc.
Ideally, it should reuse the mechanism used by urlib2, the HTTPPasswordMgr. 
Just an idea.

If HTTPPasswordMgr was used, there is an NTLM implementation that could be 
used: http://pypi.python.org/pypi/python-ntlm/

Original issue reported on code.google.com by javier.r...@gmail.com on 25 Apr 2011 at 10:12

GoogleCodeExporter commented 9 years ago
Thanks for the suggestion.  I probably won't get around to this in time for the 
upcoming 0.4 release but I'll definitely put it on my todo list.

Original comment by rfkel...@gmail.com on 25 Apr 2011 at 10:30

GoogleCodeExporter commented 9 years ago
I am looking into implementing this change.

davfs currently uses httplib, not urllib2. Implementing this feature would 
require changing the HTTP library currently in use. One other feature of davfs 
is connection pooling.

So, there are quite a few options, I would like to start a discussion about 
them.

1. Simply swap httplib for urllib2, modify internal connection pooling to work 
with urllib2.

2. Use something like urllib3, which provides connection pooling.

3. Use something completely different like the python-requests library.

4. Something else?

Original comment by btimby@gmail.com on 31 Dec 2011 at 4:51

GoogleCodeExporter commented 9 years ago
I would be delighted to replace the custom jiggery-pokery with the requests 
module.  However, part of the reason that I did a custom implementation on top 
of httplib was to get fine-grained control of streaming uploads and downloads.  
Hopefully the requests module can support this but it's not clear from the 
documentation.

So if you're feeling keen, please try using the requests module, but be aware 
that you *must not* read the entire request or response body into memory at any 
stage.

Original comment by rfkel...@gmail.com on 3 Jan 2012 at 12:26