checking invalid urls with ssl + python 2.1.3 on linux/windows

Josef Meile jmeile at hotmail.com
Wed Oct 13 07:12:00 EDT 2004


Josef Meile wrote:
 >
> [snip]
> 
> I searched on the newsgrous and found that timeoutsocket doesn't work 
> with ssl sockets. So, I tried with signal alarms and the httplib and it 
> succeeded on linux, but it doesn't work on windows because this os lacks 
> of "signal.SIGALRM" :-(. I now about "socket.setdefaulttimeout", but 
> this is a new feature and it doesn't exist on python 2.1.3 and I have to 
> provide compatibility to this version (zope 2.6.x uses it).

I gave up, I tried everything from timeoutsocket till threads, but it 
always hangs. Even with threads, it doesn't matter if they are set as 
daemons, the main thread will wait till the child threads are finished, 
thing that doesn't happen, so it just hangs. I search several 
alternatives and found that it is not a timeoutsocket problem. It seems 
to be a bug on the ssl sockets of 2.1.3. So, I guess I will have to 
avoid https url checking with this old python.

Regards,
Josef



More information about the Python-list mailing list