[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tcp-connect and core dump in MrEd.



Quoting Jordan Katz:
>    (((url) (send urlbox get-value))
>     ((sin sout) (tcp-connect url 80))
>     ((html-start) (regexp "Content-Type:.*"))
>     ((html-src) (string)))
>    (fprintf sout "GET http://www.~a/ HTTP/1.0~n~n" url)

The GET request adds a "www." to the connection address. Shouldn't
those addresses be the same? (In other words, the name in `url' should
start with "www." and the "www." should be removed from the format
string for `fprintf'.)

>   Another issue: if I pass the url http://www.microsoft.com to both
>   scripts, they both return the correct source, but the Scheme program
>   crashes and core dumps right after yielding the source.

Unless your code goes into some all-memory-consuming loop, that's
clearly a bug in MzScheme. I'll see if I can reproduce the problem.

Meanwhile, you might want to use the "url.ss" libray in the "net"
collection, which provides an interface more like the Python one.
(Search for "url" in Help Desk for more information.)

Matthew