Hmmm.  I'm seeing different behaviour.  When I run your code
untouched, I never get the "unchunked" error.  Instead, I see a bunch
of garbage printed after the echoed "hello" like so:

echo "hello" | ng nailgun.Example

hello
^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@^...@^@

With the change I suggested it seems to work fine for me.  I never see
any "Unexpected chunk type" error or broken pipes or garbage
characters.  That's what made me think it was an input stream.

Could it be a configuration problem?

g

On Jul 7, 9:18 am, Phil Hagelberg <p...@hagelb.org> wrote:
> George Jahad <andr...@blackbirdsystems.net> writes:
> > I think it is just an input stream encoding problem.  I think if you
> > change this line:
> >     (copy (-> context .in) out)
>
> > to this:
> >     (copy (-> context .in InputStreamReader.) out)
>
> > it will work.
>
> Thanks, but that gives the same result. =\
>
> Contributing to the problem is the fact that nailgun swallows all
> exceptions silently, so I wrapped the call to copy in a try/catch that
> prints the exceptions, and I get a number of different exceptions:
>
> #<SocketException java.net.SocketException: Broken pipe>
> #<SocketException java.net.SocketException: Connection reset>
> #<EOFException java.io.EOFException>
>
> The EOFException is the most common.
>
> -Phil
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to