1. 28 10月, 2015 1 次提交
  2. 07 10月, 2015 2 次提交
    • A
      use methods for accessing the cache control headers · 895c3591
      Aaron Patterson 提交于
      Use the methods rack provides so we don't have to worry about the exact
      header key.
      895c3591
    • J
      Use `Mime[:foo]` instead of `Mime::Type[:FOO]` for back compat · 565094a8
      Jeremy Daer 提交于
      Rails 4.x and earlier didn't support `Mime::Type[:FOO]`, so libraries
      that support multiple Rails versions would've had to feature-detect
      whether to use `Mime::Type[:FOO]` or `Mime::FOO`.
      
      `Mime[:foo]` has been around for ages to look up registered MIME types
      by symbol / extension, though, so libraries and plugins can safely
      switch to that without breaking backward- or forward-compatibility.
      
      Note: `Mime::ALL` isn't a real MIME type and isn't registered for lookup
      by type or extension, so it's not available as `Mime[:all]`. We use it
      internally as a wildcard for `respond_to` negotiation. If you use this
      internal constant, continue to reference it with `Mime::ALL`.
      
      Ref. efc6dd55
      565094a8
  3. 06 10月, 2015 1 次提交
    • A
      move file sending to the response object · 69009f44
      Aaron Patterson 提交于
      Just a slight refactor that delegates file sending to the response
      object.  This gives us the advantage that if a webserver (in the future)
      provides a response object that knows how to do accelerated file
      serving, it can implement this method.
      69009f44
  4. 04 10月, 2015 1 次提交
  5. 02 10月, 2015 1 次提交
  6. 25 9月, 2015 2 次提交
  7. 24 9月, 2015 1 次提交
    • A
      stop applying default headers in ActionDispatch::Response · e16afe61
      Aaron Patterson 提交于
      I'm making this change so that I can construct response objects that
      *don't* have the default headers applied.  For example, I would like to
      construct a response object from the return value of a controller.
      
      If you need to construct a response object with the default headers,
      then please use the alternate constructor:
      `ActionDispatch::Response.create`
      e16afe61
  8. 22 9月, 2015 1 次提交
  9. 15 9月, 2015 1 次提交
  10. 09 9月, 2015 8 次提交
  11. 28 8月, 2015 3 次提交
  12. 27 8月, 2015 1 次提交
  13. 26 8月, 2015 1 次提交
  14. 28 7月, 2015 1 次提交
  15. 14 7月, 2015 1 次提交
  16. 17 6月, 2015 2 次提交
  17. 16 6月, 2015 2 次提交
  18. 23 5月, 2015 1 次提交
  19. 05 3月, 2015 1 次提交
  20. 01 3月, 2015 1 次提交
    • G
      Work around for upstream Ruby bug #10685 · 707a4338
      Genadi Samokovarov 提交于
      In f6e293ec we avoided a segfault in the
      tests, however I think we should try to avoid the crash, as it may
      happen in user code as well.
      
      Here is what I distiled the bug down to:
      
      ```ruby
      # Rails case - works on 2.0, 2.1; crashes on 2.2
      require 'action_dispatch'
      
      ActionDispatch::Response.new(200, "Content-Type" => "text/xml")
      
      # General case - works on 2.0, 2.1; crashes on 2.2
      def foo(optional = {}, default_argument: nil)
      end
      
      foo('quux' => 'bar')
      ```
      707a4338
  21. 26 2月, 2015 1 次提交
    • J
      Fix default headers in test responses · f6e293ec
      Jeremy Kemper 提交于
      Fixes regression in #18423. Merge default headers for new responses,
      but don't merge when creating a response from the last session request.
      
      hat tip @senny 
      f6e293ec
  22. 04 1月, 2015 2 次提交
  23. 29 10月, 2014 2 次提交
    • X
      edit pass over all warnings · e595d91a
      Xavier Noria 提交于
      This patch uniformizes warning messages. I used the most common style
      already present in the code base:
      
      * Capitalize the first word.
      
      * End the message with a full stop.
      
      * "Rails 5" instead of "Rails 5.0".
      
      * Backticks for method names and inline code.
      
      Also, converted a few long strings into the new heredoc convention.
      e595d91a
    • X
      let's warn with heredocs · b3bfa361
      Xavier Noria 提交于
      The current style for warning messages without newlines uses
      concatenation of string literals with manual trailing spaces
      where needed.
      
      Heredocs have better readability, and with `squish` we can still
      produce a single line.
      
      This is a similar use case to the one that motivated defining
      `strip_heredoc`, heredocs are super clean.
      b3bfa361
  24. 20 10月, 2014 2 次提交