[gambit-list] {Spam?} Re: {Spam?} Spork issue (kCFErrorDomainCFNetwork error 303.)

Per Eckerdal per.eckerdal at gmail.com
Sun Aug 1 17:49:08 EDT 2010

28 jul 2010 kl. 10.32 skrev Valeriya Alex:

> Hello List,
> I am using the gambic v4.6.0, and latest blackhole + blackhole-libs and spork from the git
> When i run the next code in the bsc repl
> (import (std spork/core))
> (define c (spork-serve root: "/spork" ))
> (add-spork c ("one")
>   `(html
>     (head
>      (title "Hello, world!"))
>     (body
>      "This is my first web application using Spork :)")))
> The browser does not get any response from the localhost:8080/one
> Safari can’t open the page “http://localhost:8080/one”. The error is: “The operation couldn’t be completed.  (kCFErrorDomainCFNetwork error 303.)” (kCFErrorDomainCFNetwork:303) Please choose Safari > Report Bugs to Apple, note the error number, and describe what you did before you saw this message.
> That what happen if i use the telnet
> imc:~ valery$ telnet localhost 8080
> Trying ::1...
> telnet: connect to address ::1: Connection refused
> Trying fe80::1...
> telnet: connect to address fe80::1: Connection refused
> Trying
> Connected to localhost.
> Escape character is '^]'.
> GET /one
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title>Hello, world!</title></head><body>This is my first web application using Spork :)</body></html>Connection closed by foreign host.
> imc:~ valery$ 
> We did this test on several computers by different people and browsers. The result is the same. 
> Any ideas?

Hmm.. I don't remember seeing the problem that you're mentioning. Two things:

Are you using the code from http://github.com/pereckerdal/sack ? That's the "up-to-date" version, although it really isn't very well maintained either.

The telnet example that you give doesn't provide any insight, because you don't provide a valid HTTP request. The server assumes that the client is a pre-HTTP 1.0 client and provides a response without headers. So the response that you see from telnet isn't what the browsers get. You could try

GET /one HTTP/1.1
Host: localhost

instead, which is the minimal valid HTTP request in this case.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://webmail.iro.umontreal.ca/pipermail/gambit-list/attachments/20100801/97339f47/attachment.html 

More information about the Gambit-list mailing list