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

Changeset 1818

Show
Ignore:
Timestamp:
07/12/05 19:31:48 (4 years ago)
Author:
david
Message:

Worked around a Safari bug where it wouldn't pass headers through if the response was zero length by having render :nothing return ' ' instead of

Files:

Legend:

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

    r1813 r1818  
    560560      # 
    561561      # Rendering nothing is often convenient in combination with Ajax calls that perform their effect client-side or 
    562       # when you just want to communicate a status code. 
     562      # when you just want to communicate a status code. Due to a bug in Safari, nothing actually means a single space. 
    563563      # 
    564564      #   # Renders an empty response with status code 200 
     
    622622           
    623623        elsif options[:nothing] 
    624           render(options.merge({ :text => "" })) 
     624          # Safari doesn't pass the headers of the return if the response is zero length 
     625          render(options.merge({ :text => " " })) 
    625626 
    626627        else