We ran into a very similar problem with this as well. We have Apache/
Rails behind another Apache proxy. The Apache/Rails behind the proxy
would reply with a response like:
...
Content-Length: 4
...
<big long integer here>
The proxy layer then chopped off all but the leading 4 bytes (digits)
of the number.
Surely calling:
render :text => 12421321
isn''t smart, but it seems like render_text should enforce the textness
of it''s parameters, or it should be smarter about how it computes the
size for Content-Length.
Andy
On Apr 9, 3:02 am, "Jonathan Palley" <jpal...@gmail.com>
wrote:> All -
> Curious where to fix this bug and perhaps, more importantly, if its
> considered one at all.
>
> Using webrick,
> render :text=>numeric_or_decimal_type
>
> will never finish returning the response. WIth mongrel/etc. it works fine.
>
> This can be a problem for such functions as the in_place_editor when using
> integer/decimal data types - the response never completes. Again, its only
> a problem with webrick.
>
> Is this a flaw with webrick (i.e. it should return the request even if
> response.body = numeric) or should rails be insuring its sending a string
in
> the response.body. The simple solution is to change
>
> response.body = text
>
> in the render_text function to
>
> response.body = text.to_s.
>
> This would also potentially solve things
like:http://dev.rubyonrails.org/ticket/7067
>
> What are the thoughts on resolving this? Or is it a purposeful behavior?
>
> Thanks,
> Jonathan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---