urllib/httplib under NT...

Ron Forrester (rjf@aurora.pcg.com)
Fri, 27 Jan 1995 11:03:25 -0700

Thanks to all those who responded on trying to help me get the urllib/httplib
stuff working under NT.

It works now and the changes were quite minimal (I have forwarded the
information to Mark Hammond).

In brief, the problem was that under NT, sockets are opened in overlapped mode
(meaning asynchonous mode, i.e. the read/write's return immediately and the
I/O is done in the background). This is fine until you dup the socket handle
and fdopen' it. The stream I/O stuff does not work properly on overlapped
handles.

The fix (which I still have not found documented - Chris pointed it out) was
to tell the WinSock stuff to open all sockets in syncronous (non-overlapped
mode) by default.

Again, thanks to all!
(I now have an NT cron job running nightly to auto download/print the latest
Dilbert!)

rjf

-- 
| "I don't like being bluffed -- makes me doubt     |    rjf@aurora.pcg.com |
| my perception of reality..."                      |            71722,3175 |
|                      Chris in the morning on KBHR |                       |
+---------------------------------------------------+-----------------------+