Set-Cookie: appearing on page

I was able to set up a virtual host, using Dyndns’s wildcard capability.

So my site is mostly working (thought I do have it still in development
mode).

One thing I’m still seeing, in the Admin pages, when I click the Plus
next to the Articles page (in the default setup), the spinner wheel
shows for a long time. Then the children appear, but below the last
child is:

Set-Cookie: _session_id=593f6ac8b238a85961a87259f6e59e87; path=/
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html;charset=utf-8

0

Not sure where to look for this. Looks like some weird RJS thing?
Anyone have an idea?

Thanks!

Yeah it might be a weird Ajax thing. You can inspect xmlhttprequests
easily,
though: just install Firebug for Firefox, open it up (F12) when you
enter
the admin and go to “options” (last option, check it).

When you click on the “plus”-es now you can see the requests in console.
Inspect the server response by clicking on them.

Your problem doesn’t seem to me like a client-side problem because you
can
insert response headers into the page by an accident. It might be a
server
problem

On 9/29/06, Mislav MarohniÄ? [email protected] wrote:

Your problem doesn’t seem to me like a client-side problem because you can
insert response headers into the page by an accident.

Sorry. Here I meant to say “you CAN’T insert response headers into the
page
by an accident”

On 9/29/06, John T. [email protected] wrote:

On 9/29/06, Mislav Marohniæ [email protected] wrote:

On 9/29/06, Mislav Marohniæ <[email protected] > wrote:

Your problem doesn’t seem to me like a client-side problem because you can insert response headers into the page by an accident.

Hm. Running with Firefox shows the Response Header as:

Date: Fri, 29 Sep 2006 12:51:43 GMT
Server: Apache/2.0.55 (Ubuntu) DAV/2 SVN/1.3.1 PHP/5.1.2
mod_perl/2.0.2 Perl/v5.8.7
Cache-Control: no-cache

The tail end of the response shows:

  <td class="remove"><a

href=“http://radiant.tsom.homelinux.com/admin/pages/remove/8”>remove page

</tr>

Set-Cookie: _session_id=eeeb8063fc9e06665dc581dcf9b379af; path=/
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html;charset=utf-8

0

Doing the same with the demo Radiant site shows under Headers:

Date: Fri, 29 Sep 2006 12:40:51 GMT
Server: lighttpd | wiseheart design
Content-Type: text/html;charset=utf-8
Cache-Control: no-cache
Set-Cookie: _session_id=1dfcb2cdcd318b64e88b1ab075b20b5b; path=/
X-Powered-By: The blood, sweat and tears of the fine, fine TextDrive
staff
Served-By: TextDrive
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 526
Connection: close

So for some reason, half of the headers are not being interpreted as
headers.

On 9/29/06, John T. [email protected] wrote:

So for some reason, half of the headers are not being interpreted as
headers.

That’s what I thought. What kind of Apache setup do you have?

It doesn’t look like it originates from Apache… those are the headers
set
by the application

On 9/29/06, Mislav MarohniÄ? [email protected] wrote:

On 9/29/06, Mislav MarohniÄ? [email protected] wrote:

Your problem doesn’t seem to me like a client-side problem because you
can insert response headers into the page by an accident.

Sorry. Here I meant to say “you CAN’T insert response headers into the
page by an accident”

It probably is a server problem. When I run via script/server, it runs
just
fine.

Now I have to find that Apache setting…

Thanks,

jt

On 9/30/06, Mislav Marohniæ [email protected] wrote:

On 9/29/06, John T. [email protected] wrote:

So for some reason, half of the headers are not being interpreted as
headers.

That’s what I thought. What kind of Apache setup do you have?

It doesn’t look like it originates from Apache… those are the headers set
by the application

It’s Apache 2.0.55, standard setup with Ubuntu Linux.

I even tried loading the URL that’s requested in the Ajax request
right in the browser, and it shows the partial table and at the
bottom, the partial headers too.

On 9/30/06, John T. [email protected] wrote:

It’s Apache 2.0.55, standard setup with Ubuntu Linux.

Yeah, but that’s now complete info. You power Rails with mod_ruby, cgi,
fastcgi, proxying to mongrel?

On 10/1/06, John T. [email protected] wrote:

On 10/1/06, Mislav Marohniæ [email protected] wrote:

On 9/30/06, John T. [email protected] wrote:

It’s Apache 2.0.55, standard setup with Ubuntu Linux.

Yeah, but that’s now complete info. You power Rails with mod_ruby, cgi,
fastcgi, proxying to mongrel?

Ah, sorry. Apache with fcgid.

Well, I tried switching to cgi (in .htaccess) and I don’t see the
headers on the page. Switching back to fcgid shows the headers again.
So, it seems to be something with fcgid then.

Thanks.

When I try loading that specific URL for the children item, as I had
mentioned, the header items appear at the bottom of the page. The page
also takes a relativly long time to load too. I’m not sure why it’s
taking so long (clicking between items is relativly instant -
expanding the item takes anywhere from 5 to 10 seconds.)

On 10/1/06, Mislav Marohniæ [email protected] wrote:

On 9/30/06, John T. [email protected] wrote:

It’s Apache 2.0.55, standard setup with Ubuntu Linux.

Yeah, but that’s now complete info. You power Rails with mod_ruby, cgi,
fastcgi, proxying to mongrel?

Ah, sorry. Apache with fcgid.

On 01-Oct-2006 18:09 -0400, John T. was heard to say:

Well, I tried switching to cgi (in .htaccess) and I don’t see the
headers on the page. Switching back to fcgid shows the headers again.
So, it seems to be something with fcgid then.

Try mod_fastcgi, I have no problem with that and Rails. For me fcgid
makes
a lot of trouble in a different non-Rails setup and it would not
surprise
me if it’s fcgid that adds those headers at the end of the response.

I personally am in the process of switching all my fastcgi Rails
instances
over to Mongrel as it seems to perform a little better and is much
easier
to manage in many aspects (suexec, process management, load-balancing,
etc.).

Cheers,
Oliver

On 10/2/06, Oliver B. [email protected] wrote:

Try mod_fastcgi, I have no problem with that and Rails. For me fcgid makes
a lot of trouble in a different non-Rails setup and it would not surprise
me if it’s fcgid that adds those headers at the end of the response.

I personally am in the process of switching all my fastcgi Rails instances
over to Mongrel as it seems to perform a little better and is much easier
to manage in many aspects (suexec, process management, load-balancing,
etc.).

I don’t have any problems with fcgid with other Rails apps, just this
one. Looking at the same page on the Radiant demo site, I see all of
the headers, but they are properly in the Header of the response. Just
seems odd why fcgid would pull those items out (and they aren’t
consecutive either - if they were the last 3 or 4, then maybe, but
it’s pulling like the second, fourth and fifth header item)

I do have lighttpd installed, but not running on the server. Maybe
it’s time to figure out how to have this app running on lightty and
have apache proxy requests to it (grr… I just got Apache to serve up
the app correctly :confused: )

Thanks

Bizzare. I don’t know how to help you. It might be anything from Apache
module quirk to something terribly wrong in Rails internals. Try
searching
for your problem on Google, blogs and Rails mailing lists. Try to debug
those specific views, also.

Check the way Radiant adds response headers and then make a new blank
app
and try to set some (any) headers there with the same Rails/Apache
setup,
then inspect the output. Recreating the bug helps greatly in identifying
the
problem.

-M

On 10/3/06, John T. [email protected] wrote:

On 10/2/06, Oliver B. [email protected] wrote:

Try mod_fastcgi, I have no problem with that and Rails. For me fcgid makes
a lot of trouble in a different non-Rails setup and it would not surprise
me if it’s fcgid that adds those headers at the end of the response.

I tried running under Mongrel, and it runs fine. No extra headers.

The odd part is, when (running under Apache/fcgid) clicking the plus
to expand the item, it takes quite a while to respond. The spinner
shows for upward of 20 seconds. There isn’t any problem with the
database (mysql) - everything else runs fine and quick.

Is anyone running radiant under apache with fcgid without problems? I
tried posting on the Rails mailing list to see if anyone has any
problems with fcgid / ajax / headers, but as usual I haven’t received
any responses.

Thanks