This might be re-inventing the wheel of exiting "put url" and "load url"
commands but here goes:
I was trying to query web site with the "put url" command, but this command
lock the process when the internet link was less than perfect (I am on
dialup most of the time).
So I changed the query method to "load url x with message y" -- helps a
little, but still hog from time to time when the connection was real poor.
The "load url" pause for few seconds (occasionally to a minute)
So I took the trouble to write my own method by using socket, and opened up
a Pandora box.
A typical http session returns something as follow:
HTTP/1.1 200 OK
Server: MetaCard/2.3 ID/11222
MIME-Version: 1.0
Content-type: text/html
Content-Length: 102
And follow by the content of the file.
However, not many http server returns the "Content-Length" header in many
cases (special CGI generated result). So I have problem to determine how
many bytes to read with:
read from socket x for y chars
Anyone out there has better idea of how can I deal with it?
###
Anyone would like a copy of the code may email me privately.
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.