# Activeresource-2.3.2 HTTPHeaderSyntaxError

**URL:** <https://www.ruby-forum.com/t/activeresource-2-3-2-httpheadersyntaxerror/168447>\
**Category:** Rails\
**Created:** [May 20, 2009, 9:44pm UTC](https://www.ruby-forum.com/t/activeresource-2-3-2-httpheadersyntaxerror/168447 "2009-05-20T21:44:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pekeler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/94ad74/32.png) [@pekeler](https://www.ruby-forum.com/u/pekeler)\
**Post date:** [May 20, 2009, 9:44pm UTC](https://www.ruby-forum.com/t/activeresource-2-3-2-httpheadersyntaxerror/168447/1 "2009-05-20T21:44:08Z")

</div>

Hi,

I’m upgrading my app from 2.2.2 to 2.3.2 and am having a problem with  
ActiveResource.

```
class FooResource < ActiveResource::Base
  self.site = "whatever"
  self.element_name = "foo"
end

FooResource.create(:bar => 'baz')

```

raises:

```
Net::HTTPHeaderSyntaxError: wrong Content-Length format
  from /usr/local/lib/ruby/1.8/net/http.rb:1334:in `content_length'
  from /usr/local/lib/ruby/1.8/net/http.rb:2210:in `read_body_0'
  from /usr/local/lib/ruby/1.8/net/http.rb:2173:in `read_body'
  from /usr/local/lib/ruby/1.8/net/http.rb:846:in `post'
  from /usr/local/lib/ruby/1.8/net/http.rb:1053:in `request'
  from /usr/local/lib/ruby/1.8/net/http.rb:2136:in `reading_body'
  from /usr/local/lib/ruby/1.8/net/http.rb:1052:in `request'
  from /usr/local/lib/ruby/1.8/net/http.rb:1037:in `request'
  from /usr/local/lib/ruby/1.8/net/http.rb:543:in `start'
  from /usr/local/lib/ruby/1.8/net/http.rb:1035:in `request'
  from /usr/local/lib/ruby/1.8/net/http.rb:845:in `post'
  from /usr/local/lib/ruby/gems/1.8/gems/activeresource-2.3.2/lib/

```

active\_resource/connection.rb:149:in `send' from /usr/local/lib/ruby/gems/1.8/gems/activeresource-2.3.2/lib/ active_resource/connection.rb:149:in`request’  
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/  
active\_support/core\_ext/benchmark.rb:17:in `ms' from /usr/local/lib/ruby/1.8/benchmark.rb:308:in`realtime’  
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/  
active\_support/core\_ext/benchmark.rb:17:in `ms' from /usr/local/lib/ruby/gems/1.8/gems/activeresource-2.3.2/lib/ active_resource/connection.rb:149:in`request’  
from /usr/local/lib/ruby/gems/1.8/gems/activeresource-2.3.2/lib/  
active\_resource/connection.rb:134:in `post' from /usr/local/lib/ruby/gems/1.8/gems/activeresource-2.3.2/lib/ active_resource/base.rb:995:in`create’  
from /usr/local/lib/ruby/gems/1.8/gems/activeresource-2.3.2/lib/  
active\_resource/base.rb:796:in `save_without_validation' from /usr/local/lib/ruby/gems/1.8/gems/activeresource-2.3.2/lib/ active_resource/validations.rb:248:in`save’  
from /usr/local/lib/ruby/gems/1.8/gems/activeresource-2.3.2/lib/  
active\_resource/base.rb:465:in `create' from /usr/local/lib/ruby/gems/1.8/gems/activeresource-2.3.2/lib/ active_resource/base.rb:465:in`tap’  
from /usr/local/lib/ruby/gems/1.8/gems/activeresource-2.3.2/lib/  
active\_resource/base.rb:465:in `create’  
from (irb):6\>\>

I’m using ruby 1.8.7p160 on OSX, also tried different ruby versions.  
This is working fine with rails 2.2.2. Has anyone dealt with this  
problem before?

Thanks,  
Christian

---

<div class="post-metadata">

**Author:** ![pekeler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/94ad74/32.png) [@pekeler](https://www.ruby-forum.com/u/pekeler)\
**Post date:** [May 21, 2009, 7:49pm UTC](https://www.ruby-forum.com/t/activeresource-2-3-2-httpheadersyntaxerror/168447/2 "2009-05-21T19:49:50Z")

</div>

Turns out that Rails 2.3.2 (specifically Rack) is incompatible with  
Mongrel 1.0.1. Updating to the latest Mongrel gem 1.1.5 solved the  
problem.

Christian
