method

handle_conditional_get!

rails latest stable - Class: ActionController::AbstractResponse

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.2.1) is shown here.

handle_conditional_get!()
private

No documentation available.

# File actionpack/lib/action_controller/response.rb, line 144
      def handle_conditional_get! 
        if etag? || last_modified? 
          set_conditional_cache_control! 
        elsif nonempty_ok_response? 
          self.etag = body 

          if request && request.etag_matches?(etag) 
            self.status = '304 Not Modified' 
            self.body = '' 
          end 

          set_conditional_cache_control! 
        end 
      end