Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Dev

Dropping characters when using fastcgi

 

 

Catalyst dev RSS feed   Index | Next | Previous | View Threaded


mbrutsch at gmail

Oct 9, 2010, 7:51 PM

Post #1 of 4 (1389 views)
Permalink
Dropping characters when using fastcgi

I'm trying to run Catalyst on a shared server. I've installed all the
modules, downloaded and run all the tests in chapter 8 of the
Catalyst::Manual::Tutorial, and everything seems to check out. I've
followed the steps in the first two chapters of said tutorial, and
everything works fine when I run the development server. My shared
provider, however, has forbidden me to run the development server, and asked
that I use fastcgi. I followed the steps in this wiki page (
http://wiki.dreamhost.com/Catalyst) to get the fastcgi configured, and the
welcome page loads properly. However, when I try to run the 'Hello, World"
test, it drops the final few characters; all I get is "He". The next couple
of example do the same; they appear to work properly, the error log looks
normal, but it drops the last few characters of output. I verified this by
adding extra characters to the end; when I do, I get the entire "Hello,
World".

I have no idea where to look for a solution to this problem. I didn't
include any config info, as I didn't want to clutter up the list with
unneeded blobs of text, but I'll gladly reply with any settings that may be
relevant. Any help would be greatly appreciated.

Cheers,
Michael Brutsch


bobtfish at bobtfish

Feb 16, 2011, 12:58 AM

Post #2 of 4 (1109 views)
Permalink
Re: Dropping characters when using fastcgi [In reply to]

On 10 Oct 2010, at 03:51, Michael Brutsch wrote:

> I'm trying to run Catalyst on a shared server. I've installed all
> the modules, downloaded and run all the tests in chapter 8 of the
> Catalyst::Manual::Tutorial, and everything seems to check out. I've
> followed the steps in the first two chapters of said tutorial, and
> everything works fine when I run the development server. My shared
> provider, however, has forbidden me to run the development server,
> and asked that I use fastcgi. I followed the steps in this wiki
> page (http://wiki.dreamhost.com/Catalyst) to get the fastcgi
> configured, and the welcome page loads properly. However, when I
> try to run the 'Hello, World" test, it drops the final few
> characters; all I get is "He". The next couple of example do the
> same; they appear to work properly, the error log looks normal, but
> it drops the last few characters of output. I verified this by
> adding extra characters to the end; when I do, I get the entire
> "Hello, World".
>
> I have no idea where to look for a solution to this problem. I
> didn't include any config info, as I didn't want to clutter up the
> list with unneeded blobs of text, but I'll gladly reply with any
> settings that may be relevant. Any help would be greatly appreciated.

HTTP traces of what's actually happening and your app source code
would be helpful...

Are you using the Unicode plugin (either of them), or are you
outputting non-ascii? The mismatch between characters and bytes could
be causing the Content-Length to be miscalculated...

Other than that, I'm stuck for ideas without a whole lot more info.

Cheers
t0m


_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


nine at detonation

Feb 16, 2011, 2:08 AM

Post #3 of 4 (1109 views)
Permalink
Re: Dropping characters when using fastcgi [In reply to]

On Wednesday 16 February 2011 09:58:45 Tomas Doran wrote:
> On 10 Oct 2010, at 03:51, Michael Brutsch wrote:
> > I'm trying to run Catalyst on a shared server. I've installed all
> > the modules, downloaded and run all the tests in chapter 8 of the
> > Catalyst::Manual::Tutorial, and everything seems to check out. I've
> > followed the steps in the first two chapters of said tutorial, and
> > everything works fine when I run the development server. My shared
> > provider, however, has forbidden me to run the development server,
> > and asked that I use fastcgi.

Is your provider using mod_fastcgi and compression? There is a bug in released
versions of mod_fastcgi that causes a wrong content-length header to be sent
if compression is activated. We use the latest snapshot for this reason.

> > I followed the steps in this wiki
> > page (http://wiki.dreamhost.com/Catalyst) to get the fastcgi
> > configured, and the welcome page loads properly. However, when I
> > try to run the 'Hello, World" test, it drops the final few
> > characters; all I get is "He". The next couple of example do the
> > same; they appear to work properly, the error log looks normal, but
> > it drops the last few characters of output. I verified this by
> > adding extra characters to the end; when I do, I get the entire
> > "Hello, World".

The Wiki page you linked even has a section on GZIP /FASTCGI talking about the
mod_fastcgi problem.

> HTTP traces of what's actually happening and your app source code
> would be helpful...
>
> Are you using the Unicode plugin (either of them), or are you
> outputting non-ascii? The mismatch between characters and bytes could
> be causing the Content-Length to be miscalculated...

Only for characters that take more than one byte in UTF-8, so "hello world"
should be completely safe.

> Other than that, I'm stuck for ideas without a whole lot more info.

Stefan

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


bobtfish at bobtfish

Feb 16, 2011, 2:16 AM

Post #4 of 4 (1110 views)
Permalink
Re: Dropping characters when using fastcgi [In reply to]

On 16 Feb 2011, at 10:08, Stefan Seifert wrote:
>> Are you using the Unicode plugin (either of them), or are you
>> outputting non-ascii? The mismatch between characters and bytes could
>> be causing the Content-Length to be miscalculated...
>
> Only for characters that take more than one byte in UTF-8, so "hello
> world"
> should be completely safe.

Sure, but I don't automatically assume that when someone says 'a hello
world program', that they're _actually_ printing 'hello world' - at
least not without being shown the code :)

Cheers
t0m


_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev

Catalyst dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.