Hendrik Boom writes:
On Fri, Feb 08, 2013 at 01:47:14AM -0200, Eduardo Costa wrote:
One year or so ago, I contacted this list about running Gambit on Linux (I compiled the programs on Zorin/Ubuntu, and tried to run them on a choice of Linux hosting services). My programs work perfectly well in about every Scheme compiler, except Gambit. For instance, they run on Bigloo, Racket, Larceny, Ikarus, Vicare, Chez, to name a few. The programs also run on Dorai's Scheme to Common Lisp compiler. I tried the Scheme to Common Lisp compiler with SBCL, CMUCL, CLISP, ECL, etc. However, they don't run on Gambit. Although the production code is quite complex (for instance, it includes Serrano's sqlite clone), I wrote a very simple example in order to show what the problem is:
#! ./gsi -:d- (display "Content-type: text/html") (newline) (newline) (display "<html><body>Teste:") (newline) (display "<h1>Hello</h1>") (newline) (display "</html></body>") (newline)
The error is:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
I don't know what server might be complaining, but your tags are not properly nested., aand it looks as if a few are missing. For example, at the start, <body> is nested within <html>, and at thhe end, </html> is nested within </body>.
Als0, shouldn't there be some kind of tag around Content-type: text/html
Sorry if I haven't found a problem with Gambit, but it seems to me there are problems in what you're asking it to do.
There mustn't be tags around an HTTP header line, but might it have something to do about (newline) producing only \n when HTTP wants \r\n? Just a wild guess, and I don't see why that would happen only in Gambit.
Another possibility is that Gambit needs some environment variable that is not set properly when the web server tries to execute ./gsi - I assume that the script executes properly when run manually. Just another wild guess.
The mixed HTML tags should not be a server error, though in a better world they would make every major browser display an error message.