# Dispatch.fcgi aborted: error parsing headers

**URL:** <https://www.ruby-forum.com/t/dispatch-fcgi-aborted-error-parsing-headers/54284>\
**Category:** Rails\
**Created:** [February 28, 2006, 4:57pm UTC](https://www.ruby-forum.com/t/dispatch-fcgi-aborted-error-parsing-headers/54284 "2006-02-28T16:57:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marc-AndrSSSS\_Gagno](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e19adc/32.png) [@Marc-AndrSSSS\_Gagno](https://www.ruby-forum.com/u/Marc-AndrSSSS_Gagno)\
**Post date:** [February 28, 2006, 4:57pm UTC](https://www.ruby-forum.com/t/dispatch-fcgi-aborted-error-parsing-headers/54284/1 "2006-02-28T16:57:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Marc-AndrSSSS\_Gagno](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e19adc/32.png) [@Marc-AndrSSSS\_Gagno](https://www.ruby-forum.com/u/Marc-AndrSSSS_Gagno)\
**Post date:** [February 28, 2006, 9:52pm UTC](https://www.ruby-forum.com/t/dispatch-fcgi-aborted-error-parsing-headers/54284/2 "2006-02-28T21:52:45Z")

</div>

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

- [David N. Welton](http://www.dedasys.com/davidw/)

Linux, Open Source Consulting

- [http://www.dedasys.com/](http://www.dedasys.com/)

---

<div class="post-metadata">

**Author:** ![Marc-AndrSSSS\_Gagno](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e19adc/32.png) [@Marc-AndrSSSS\_Gagno](https://www.ruby-forum.com/u/Marc-AndrSSSS_Gagno)\
**Post date:** [March 1, 2006, 3:44am UTC](https://www.ruby-forum.com/t/dispatch-fcgi-aborted-error-parsing-headers/54284/3 "2006-03-01T03:44:13Z")

</div>

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
> 
> - [David N. Welton](http://www.dedasys.com/davidw/)
> 
> Linux, Open Source Consulting
> 
> - [http://www.dedasys.com/](http://www.dedasys.com/)

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