could RAW_POST_DATA be altered?

I've been working on a very low-level issue on RubyAMF.

In a nutshell, I need to figure out if its at all possible that rails' request.env['RAW_POST_DATA'] or request.raw_post for that matter could possibly be interpretting a byte stream and mistakingly truncating it by a byte or two in certain places.

For example, in this byte stream lies a compressing Gzipped stream. And sometimes (like 1 in 100) this stream will be short a couple of characters (like 1-3) and appear corrupted.

How can I access the raw data before ruby/rails puts its hands on it. Anyway to dip into the CGI directly. I want as few operations on the RAW_POST_DATA as possible.

I've been working on a very low-level issue on RubyAMF.

In a nutshell, I need to figure out if its at all possible that rails' request.env['RAW_POST_DATA'] or request.raw_post for that matter could possibly be interpretting a byte stream and mistakingly truncating it by a byte or two in certain places.

There's a thing where (to work around a bug in safari) the last byte of a post request is dropped if it is 0 (see clean_up_ajax_request_body in action_controller/request.rb)

Fred