Problems with Amrita2 and HTTP headers

I'm experimenting with different Ruby-based web development tools, but
can't get Amrita2 working. For some reason I keep getting "FastCGI:
incomplete headers (0 bytes) received from server" in the Apache logs.

I've tried the examples as shown and added in an explicit
"Content-Type" header, but neither works. I know the FastCGI works
normally since I can run a simple Ruby script with no problems.

Does anyone know what I am missing?

Thanks for any help,

Wayne

You might try running it from Webrick first to see if it is something
specific to FastCGI or what. I'm not sure what could be wrong though I
haven't moved to using FastCGI yet. All my tests with Webrick, Amrita2
worked just fine.

Jeff

Jeff,

Thanks for the reply, I did manage to make some progress in narrowing
down where the problem is. Apparently the issue is the line:

    tmpl.expand(STDOUT, PO.new)

When I comment that out there are no errors (no data either). Amrita2
worked fine from irb as well. I haven't been able to find the code
responsible for returning data yet, none of the following worked
either:

    content = tmpl.expand(STDOUT, PO.new)
    tmpl.expand(content, PO.new)
    tmpl.expand(:content, PO.new)

With the lines above I was trying to capture the response and then
pass that to the cgi.out.

Thanks again,

Wayne

···

On 5/10/05, Jeff Barczewski <jeff.barczewski@gmail.com> wrote:

You might try running it from Webrick first to see if it is something
specific to FastCGI or what. I'm not sure what could be wrong though I
haven't moved to using FastCGI yet. All my tests with Webrick, Amrita2
worked just fine.

Jeff

Ok...I figured it out.

First I had to set a variable, in this case "content". Then I could use:

    tmpl.expand(content, PO.new)

Previously I hadn't created the variable content before, I figured
Ruby would do that for me.

Wayne

···

On 5/10/05, Wayne Pierce <shalofin@gmail.com> wrote:

Jeff,

Thanks for the reply, I did manage to make some progress in narrowing
down where the problem is. Apparently the issue is the line:

    tmpl.expand(STDOUT, PO.new)

When I comment that out there are no errors (no data either). Amrita2
worked fine from irb as well. I haven't been able to find the code
responsible for returning data yet, none of the following worked
either:

    content = tmpl.expand(STDOUT, PO.new)
    tmpl.expand(content, PO.new)
    tmpl.expand(:content, PO.new)

With the lines above I was trying to capture the response and then
pass that to the cgi.out.

Thanks again,

Wayne

On 5/10/05, Jeff Barczewski <jeff.barczewski@gmail.com> wrote:
> You might try running it from Webrick first to see if it is something
> specific to FastCGI or what. I'm not sure what could be wrong though I
> haven't moved to using FastCGI yet. All my tests with Webrick, Amrita2
> worked just fine.
>
> Jeff
>
>