Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 6741

Show
Ignore:
Timestamp:
05/15/07 22:01:00 (2 years ago)
Author:
bitsweat
Message:

Lazy-read request.raw_post from request.body

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_controller/request.rb

    r6740 r6741  
    242242    # which communicate over HTTP POST but don't use the traditional parameter format. 
    243243    def raw_post 
    244       @env['RAW_POST_DATA'] 
     244      @env['RAW_POST_DATA'] ||= body.read 
    245245    end 
    246246