Problems with Amrita2 and HTTP headers.

Discussion in 'Ruby' started by Wayne Pierce, May 10, 2005.

  1. Wayne Pierce

    Wayne Pierce Guest

    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
     
    Wayne Pierce, May 10, 2005
    #1
    1. Advertising

  2. 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 Barczewski, May 10, 2005
    #2
    1. Advertising

  3. Wayne Pierce

    Wayne Pierce Guest

    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 =3D 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 <> 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.
    >=20
    > Jeff
    >=20
    >
     
    Wayne Pierce, May 10, 2005
    #3
  4. Wayne Pierce

    Wayne Pierce Guest

    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 <> wrote:
    > Jeff,
    >=20
    > Thanks for the reply, I did manage to make some progress in narrowing
    > down where the problem is. Apparently the issue is the line:
    >=20
    > tmpl.expand(STDOUT, PO.new)
    >=20
    > 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:
    >=20
    > content =3D tmpl.expand(STDOUT, PO.new)
    > tmpl.expand(content, PO.new)
    > tmpl.expand:)content, PO.new)
    >=20
    > With the lines above I was trying to capture the response and then
    > pass that to the cgi.out.
    >=20
    > Thanks again,
    >=20
    > Wayne
    >=20
    > On 5/10/05, Jeff Barczewski <> 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
    > >
    > >

    >
     
    Wayne Pierce, May 10, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ian
    Replies:
    2
    Views:
    2,022
  2. Taku Nakajima

    [ANN] Amrita2 initial release

    Taku Nakajima, Feb 24, 2005, in forum: Ruby
    Replies:
    0
    Views:
    127
    Taku Nakajima
    Feb 24, 2005
  3. Taku Nakajima
    Replies:
    5
    Views:
    126
    Lloyd Zusman
    Mar 28, 2005
  4. Taku Nakajima

    [ANN] Amrita2-1.9.3

    Taku Nakajima, Mar 11, 2005, in forum: Ruby
    Replies:
    0
    Views:
    103
    Taku Nakajima
    Mar 11, 2005
  5. Taku Nakajima

    [ANN] Amrita2 1.9.4

    Taku Nakajima, Apr 12, 2005, in forum: Ruby
    Replies:
    1
    Views:
    107
    Aredridel
    Apr 12, 2005
Loading...

Share This Page