hello world example error

37 views
Skip to first unread message

vicent roca daniel

unread,
Jul 28, 2012, 12:29:08 PM7/28/12
to golia...@googlegroups.com
Hi guys,
I'm trying goliath.io and I keep getting this error on the hello_world example:

XML Parsing Error: syntax error
Location: http://www.airosmonitor.com:9000/
Line Number 1, Column 1:Hello world
^

I've just copyed the hello_world example and runned with  ruby hello.rb -sv

¿any pointers?
Thanks! :)

vicent roca daniel

unread,
Jul 28, 2012, 12:54:40 PM7/28/12
to golia...@googlegroups.com
I commented this line, and now I can get a response: #use Goliath::Rack::Render, ['json']

Ilya Grigorik

unread,
Jul 28, 2012, 4:18:20 PM7/28/12
to golia...@googlegroups.com
Looks like your browser is interpreting the response as XML, and it's not XML.. What browser? 

Try just curl localhost:9000 from your command line.

vicent roca daniel

unread,
Jul 29, 2012, 10:59:07 AM7/29/12
to golia...@googlegroups.com
Hi llya, thanks for answering.

curl -v http://127.0.0.1:9000/
* About to connect() to 127.0.0.1 port 9000 (#0)
*   Trying 127.0.0.1... connected
* Connected to 127.0.0.1 (127.0.0.1) port 9000 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3
> Host: 127.0.0.1:9000
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< Server: PostRank Goliath API Server
< Vary: Accept
< Content-Length: 14
< Date: Sun, 29 Jul 2012 14:58:38 GMT
<
* Connection #0 to host 127.0.0.1 left intact
* Closing connection #0
"Hello World!"root@ks309880:~#

You are right.
I'm using firefox 12.0
Reply all
Reply to author
Forward
0 new messages