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 127.0.0.1...
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.

best,
Per