[Zope] DocumentLibrary, KebasData and https
Ken
firerooster@netscape.net
Wed, 25 Sep 2002 13:31:40 +0200 (CEST)
Hi again,
Here is what I have been able to do to get DocumentLibrary to work with https, but I still need help as you will see.
Sorry in advance for my verbosity.
I have two Zopes: both 2.5.1 on FreeBSD4.3
one installed from binaries and running the bundled Python;
one installed from sources running Python 2.1.3 compiled prior to installing Zope
I checked for the SSL:
bundled python: not found
compiled python: <built-in function ssl>
Try to import https document into each zope: Document submission error (similar to below, but without the line beginning with 'Error Message:')
Then I changed Document.py:
class DocURLopener(urllib.FancyURLopener) to use
class DocURLopener(urllib.URLopener)
(changed all occurances of FancyURLopener to URLopener)
and in line 491 of def manage_upload added 'https' to list of acceptable protocols.
Attempted to add a https document to each zope.
Result: it worked in the zope using SSL-enabled python, but failed in the zope using bundled python. The following message is a dtml method returned by DocumentLibrary:
---
Document Submission Error
The URL you specified for the document could not be submitted because:
An error occurred while attempting to connect to https://foo.bar.com/baz
Error Message: [Errno url error] unknown url type: 'https'
To correct this problem try the following:
Confirm that you can access the URL as entered using your web browser. Click on the URL link above to test it in your browser
Make sure you URL uses the http, ftp or gopher protocols. This is denoted at the front of the URL (ie http://). Other protocols (such as file: or mailto:) are not allowed for submitting documents. If the protocol is omitted, http is assumed.
To return to the form to resubmit your document, click on the Back button on your browser's toolbar.
Traceback (innermost last):
File /usr/ken/www/zope/lib/python/ZPublisher/Publish.py, line 150, in publish_module
File /usr/ken/www/zope/lib/python/Products/Localizer/__init__.py, line 53, in new_publish
File /usr/ken/www/zope/lib/python/ZPublisher/Publish.py, line 114, in publish
File /usr/ken/www/zope/lib/python/Zope/__init__.py, line 159, in zpublisher_exception_hook
(Object: standard)
File /usr/ken/www/zope/lib/python/ZPublisher/Publish.py, line 98, in publish
File /usr/ken/www/zope/lib/python/ZPublisher/mapply.py, line 88, in mapply
(Object: document_submit)
File /usr/ken/www/zope/lib/python/ZPublisher/Publish.py, line 39, in call_object
(Object: document_submit)
File /usr/ken/www/zope/lib/python/OFS/DTMLMethod.py, line 127, in __call__
(Object: document_submit)
File /usr/ken/www/zope/lib/python/DocumentTemplate/DT_String.py, line 473, in __call__
(Object: document_submit)
File /usr/ken/www/zope/lib/python/DocumentTemplate/DT_Try.py, line 140, in render
File /usr/ken/www/zope/lib/python/DocumentTemplate/DT_Try.py, line 174, in render_try_except
File /usr/ken/www/zope/lib/python/DocumentTemplate/DT_Raise.py, line 56, in render
(Object: URLError)
URLError: (see above)
---
Yesterday I ran my site with the 'good' zope, and found that I still have a big problem. My site makes extensive use of KebasData. Before upgrading to 2.5.1 KebasData was causing Zope to crash a lot. It seemed to be barfing at some of my regular expressions, at which I am far from expert. When I switched to 2.5.1 in desparation, this problem went away. Well, with the SSL-enabled zope, it's back.
Which doesn't mean that it is caused by the availability of the ssl, of course.
So that's it. I need those https documents, and it would be great if KebasData could also do https (I had sacrificed that for the stability).
Now, any ideas?
Thanks to all,
Ken