1. 10 3月, 2019 1 次提交
  2. 21 10月, 2017 1 次提交
  3. 24 8月, 2017 1 次提交
    • P
      Decouple the merge/normalization and conditional cache control logic · 94b60205
      Patrick Toomey 提交于
      The prior logic was trying to do too many things at once. For all responses,
      we want to perform two distinct steps:
      
      * Merge/normalize the `Cache-Control` values found in HTTP headers and those
        found in the `@cache_control` hash.
      * Conditionally set a default `Cache-Control` header value when we have an ETag
      
      This change separates these concerns since the merge/normalize step should
      occur for all responses, but the second should only occur when we have already
      set an ETag/last modified value. Normally ETag middleware will set a default
      `Cache-Control`, but only if an existing ETag is not already set. So, in the
      cases where an ETag is set, we need to set the default `Cache-Control` value
      ourselves.
      94b60205
  4. 29 7月, 2017 1 次提交
  5. 13 7月, 2017 3 次提交
  6. 02 7月, 2017 1 次提交
  7. 01 7月, 2017 2 次提交
  8. 20 6月, 2017 1 次提交
  9. 03 6月, 2017 1 次提交
  10. 14 3月, 2017 1 次提交
  11. 11 1月, 2017 1 次提交
  12. 20 12月, 2016 1 次提交
  13. 10 12月, 2016 1 次提交
  14. 29 10月, 2016 1 次提交
  15. 27 10月, 2016 1 次提交
  16. 30 8月, 2016 2 次提交
  17. 07 8月, 2016 3 次提交
  18. 14 3月, 2016 1 次提交
    • R
      Fixes #23964 · b43158af
      Ryan T. Hosford 提交于
        - Adds #each_chunk to ActionDispatch::Response. it's a method which
          will be called by ActionDispatch::Response#each.
        - Make Response#each a proper method instead of delegating to @stream
        - In Live, instead of overriding #each, override #each_chunk.
        - `#each` should just spit out @str_body if it's already set
        - Adds #test_set_header_after_read_body_during_action
          to prove this fixes #23964
        - Adds #test_each_isnt_called_if_str_body_is_written to
          ensure #each_chunk is not called when @str_body is available
        - Call `@response.sent!` in AC::TestCase's #perform so a test response
          acts a bit more like a real response. Makes test that call  `#assert_stream_closed`
          pass again.
        - Additionally assert `#committed?` in `#assert_stream_closed`
        - Make test that was calling @response.stream.each pass again by
          calling @response.each instead.
      b43158af
  19. 06 2月, 2016 1 次提交
  20. 14 1月, 2016 1 次提交
    • A
      Space Oddity · d9bdb611
      Akira Matsuda 提交于
      Converting nbsp(\u{00A0}) to the normal ASCII space(\u{0020})
      [ci skip]
      d9bdb611
  21. 12 1月, 2016 1 次提交
    • M
      Commit before freezing the headers · 272c5838
      Matthew Draper 提交于
      This shouldn't generally come up: under a standard flow, we don't start
      sending until after the commit. But application code always finds a way.
      272c5838
  22. 07 12月, 2015 3 次提交
    • E
      Only commit the cookie jar if it hasn't been committed · ff891616
      eileencodes 提交于
      We don't want to commit the cookie jar more than once because then we
      will be attempting to modify a frozen hash.
      
      Fixes Railties test failure caused by 492b1344.
      ff891616
    • E
      Stop violating law of demeter in response cookie_jar · 8350925b
      eileencodes 提交于
      This adds a new method to request and response so we don't need to
      violate the law of demeter.
      
      We are changing `Request` and `Response` so that they always have a
      `cookie_jar`
      
      This is a continuation on work to combine integration and controller
      test code bases in Rails.
      8350925b
    • E
      Push `before_sending` to super class · 492b1344
      eileencodes 提交于
      We want to get rid of the `Live::Response` so we are consolidating methods
      from `Live::Response` and `Response` by merging them together.
      
      This adds an `#empty` method to the request so we don't need to
      hard-code the empty array each time we call an empty
      `ActionDispatch::Request`.
      
      The work here is a continuation on combining controller and integration
      test code bases into one.
      492b1344
  23. 28 10月, 2015 1 次提交
  24. 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
  25. 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
  26. 04 10月, 2015 1 次提交
  27. 02 10月, 2015 1 次提交
  28. 25 9月, 2015 2 次提交
  29. 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
  30. 22 9月, 2015 1 次提交