Dispatch.fcgi aborted: error parsing headers

I’m trying to do file upload with rails and fcgi. Basically, i want my
users to be able to upload images on the server.

After the upload, I get a 500 error from apache and in the error log I
find this:

FastCGI: comm with server
“/var/www/workspace/mydomain/public/dispatch.fcgi” aborted: error
parsing headers: malformed header
‘R0lGODlh9AH0AfcAAGA5YEAmQCATIP+Z/++P79+G3898z69pr49Wj4BNgHBD’

The images are uploaded and saved successfully. The problem seems to
happen when the upload is completed. I’ve looked all over the web and
didnt find anything.

I’m using …

Apache 1.3
Rails 1.0
mod_fcgi 2.4.2

Any help is appreciated, thanks

Marc-André Gagnon wrote:

FastCGI: comm with server
“/var/www/workspace/mydomain/public/dispatch.fcgi” aborted: error
parsing headers: malformed header
‘R0lGODlh9AH0AfcAAGA5YEAmQCATIP+Z/++P79+G3898z69pr49Wj4BNgHBD’

The images are uploaded and saved successfully. The problem seems to
happen when the upload is completed. I’ve looked all over the web and
didnt find anything.

Random idea that I accidentally hit:

Are you doing any puts calls to stdout? That works ok in webrick, but
not under fastcgi.


David N. Welton

Linux, Open Source Consulting

David N. Welton wrote:

Random idea that I accidentally hit:

Are you doing any puts calls to stdout? That works ok in webrick, but
not under fastcgi.


David N. Welton

Linux, Open Source Consulting

No i’m not. There is not puts or print in my code.