# Max length for posted data (HTTP POST)?

**URL:** <https://www.ruby-forum.com/t/max-length-for-posted-data-http-post/143640>\
**Category:** Rails\
**Created:** [July 21, 2008, 1:32pm UTC](https://www.ruby-forum.com/t/max-length-for-posted-data-http-post/143640 "2008-07-21T13:32:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Birgit\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c77e96/32.png) [@Birgit\_A](https://www.ruby-forum.com/u/Birgit_A)\
**Post date:** [July 21, 2008, 1:32pm UTC](https://www.ruby-forum.com/t/max-length-for-posted-data-http-post/143640/1 "2008-07-21T13:32:01Z")

</div>

Hi all,

I’m trying to process some XML that is posted by 3rd party software  
(FreeSWITCH). We’re running JRuby 1.1 on Rails 2.0.2

The data that is http posted to my RoR application looks like:  
cdr=, i.e

cdr=\<?xml version="1.0"?\>  
\<cdr\>  
\<variables\>

For some reason the data is truncated, making the XML invalid.

We’ve used the same software in another project where the CDR data was  
posted to Oracle’s XSQL without this problem.

Does anyone know if Ruby (on Rails) applies a maximum length to posted  
data? If so, any idea how I can increase this length?

Thanks, Birgit

–  
– Birgit A., removed\_email\_address@domain.invalid,  
– Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK  
– Company no: 1769350  
– Registered Office:  
– 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.  
– tel.: +44 (0)161 237 0660  
– \<URL: [http://www.westhawk.co.uk](http://www.westhawk.co.uk)\>

---

<div class="post-metadata">

**Author:** ![Birgit\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/c77e96/32.png) [@Birgit\_A](https://www.ruby-forum.com/u/Birgit_A)\
**Post date:** [July 22, 2008, 1:01pm UTC](https://www.ruby-forum.com/t/max-length-for-posted-data-http-post/143640/2 "2008-07-22T13:01:54Z")

</div>

Hi all,

I’m still struggling on with this one.

I wrote a simple, straightforward Java servlet that I deployed in  
GlassFish (as well).  
The servlet receives the post, writes the xml data to a file, parses the  
XML into a DOM document and writes success/error back as response.

All is well: the XML is valid, there’s no truncation,

Since the only difference in the two setups is RoR, it must be RoR  
truncating (or not fully reading) the incoming HTTP POST.

As extra information, here is what I did RoR:

- I created a controller, model and view, using NetBeans
- Left the controller & model unaltered
- In the view I print out the ‘params’
- I deployed it in GlassFish

Do any of you have an idea how I can fix my problem?

Thanks, Birgit

On 21/07/08 12:31, Birgit A. wrote:

> \<variables\>
> 
> For some reason the data is truncated, making the XML invalid.
> 
> We’ve used the same software in another project where the CDR data was  
> posted to Oracle’s XSQL without this problem.
> 
> Does anyone know if Ruby (on Rails) applies a maximum length to posted  
> data? If so, any idea how I can increase this length?
> 
> Thanks, Birgit

–  
– Birgit A., removed\_email\_address@domain.invalid,  
– Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK  
– Company no: 1769350  
– Registered Office:  
– 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.  
– tel.: +44 (0)161 237 0660  
– \<URL: [http://www.westhawk.co.uk](http://www.westhawk.co.uk)\>
