is (web client) ready for use even for the simplest task?

2013-09-09 Thread Darren Hoo
(use-modules (web client)) (http-post "http://www.google.com/";) the POST request is sent without the Content-Length header OK, let's add something to the body (http-post "http://www.google.com/"; #:body "") Howcome the request now becomes an http GET request: GET / HTTP/1.1 Content-Type: t

How to read integers from file faster?

2013-08-30 Thread Darren Hoo
It is way too slow to read numbers from a file simply by using `read' for example a txt file contains 10,000,000 line of numbers: (define (gen-sample max k file) (with-output-to-file file (lambda () (let lp ((k k)) (when (> k 0) (display

Re: An http session that ends with a TCP Reset sent by the server

2013-06-15 Thread Darren Hoo
Mark H Weaver writes: Hi Mark, Thanks, > > While it is true that the RFCs allow a TCP connection to be "aborted" by > a RST segment, this is an error condition. It's not a proper way to end > an HTTP connection under normal circumstances. > > I believe the server you are trying to talk to is v

An http session that ends with a TCP Reset sent by the server

2013-06-13 Thread Darren Hoo
I use the web client module to access a web service as what follows scheme@(guile-user)> (use-modules (web client)) scheme@(guile-user)> (http-get "http://172.18.23.123/";) ERROR: In procedure get-bytevector-n!: ERROR: In procedure fport_fill_input: Connection reset by peer Entering a new promp

An http session that ends with a TCP Reset sent by the server

2013-06-13 Thread Darren Hoo
I used web client to access a web service as what follows: scheme@(guile-user)> (use-modules (web client)) scheme@(guile-user)> (http-get "http://172.18.23.123/";) ERROR: In procedure get-bytevector-n!: ERROR: In procedure fport_fill_input: Connection reset by peer Entering a new prompt. Type `