Re: [racket-users] net/url question

2015-10-30 Thread Jay McCarthy
I just pushed a fix for these issues. Thank you! Jay On Fri, Oct 16, 2015 at 12:17 PM, Greg Hendershott wrote: > The URL needs to get split into parts, and the HTTP request will go > "on the wire" as something like: > > HEAD HTTP/1.0 > Host: www.racket-lang.org > > > When you have

Re: [racket-users] net/url question

2015-10-16 Thread Jon Stenerson
Thanks Greg. Here's a variation that gives a little more insight. #lang racket (require net/url) (with-handlers ([(lambda (x) #t) (lambda (x) (printf "Oops!"))]) (purify-port (head-impure-port (string->url "http://www.racket-lang.org";))) ) I repeatedly run this. In all

Re: [racket-users] net/url question

2015-10-16 Thread Greg Hendershott
The URL needs to get split into parts, and the HTTP request will go "on the wire" as something like: HEAD HTTP/1.0 Host: www.racket-lang.org When you have the trailing / it will be: HEAD / HTTP/1.0 Which makes sense. When the trailing slash is missing, i.e. "no path", I'm gue

[racket-users] net/url question

2015-10-16 Thread Jon Stenerson
This works: > (define p (head-impure-port (string->url "http://www.racket-lang.org/";))) > (read-line p) "HTTP/1.1 200 OK\r" But, leaving off trailing /, I usually see > (define p (head-impure-port (string->url "http://www.racket-lang.org";))) string-trim: contract violation expected: string