orthecreedence / drakma-async

An asynchronous version of drakma that runs off of cl-async
38 stars 5 forks source link

HTTP connection EOF: -1: HTTP stream client peer closed connection. #23

Open nightshade427 opened 10 years ago

nightshade427 commented 10 years ago
(as:with-event-loop ()                                                                                                                                                   
           (asf:alet ((mine (drakma-async:http-request "http://www.sonosite.com" :method :head :additional-headers '(("Connection" . "close")))))                                 
             (format t "~%mine: ~s" mine))) 

gives HTTP connection EOF: -1: HTTP stream client peer closed connection.

But this works

(as:with-event-loop ()                                                                                                                                                   
           (asf:alet ((mine (drakma:http-request "http://www.sonosite.com" :method :head :additional-headers '(("Connection" . "close")))))                                 
             (format t "~%mine: ~s" mine))) 

But so do this, so I have no clue what to think.

(as:with-event-loop ()                                                                                                                                                   
           (asf:alet ((mine (drakma-async:http-request "http://www.google.com" :method :head :additional-headers '(("Connection" . "close")))))                                   
             (format t "~%mine: ~s" mine)))

Its like www.sonosite.com does something strange that regular drakma handle, but drakma-async cant?

nightshade427 commented 10 years ago

This errors too

(as:with-event-loop ()                                                                                                                                                   
           (asf:alet ((mine (drakma-async:http-request "http://www.lpga.com" :method :head :additional-headers '(("Connection" . "close")))))                                     
             (format t "~%mine: ~s" mine))) 
orthecreedence commented 10 years ago

This is an odd one. It seems these servers are closing the HTTP connection before (or in the same packet) the data comes through. This is making cl-async think that there's no further data on the sockets, event when I'm manually trying to force a read. Going to keep playing with this a bit more.