-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grape v1.4.0 regression: Cache-Control is always set to no-cache #2087
Comments
I'm also not sure if overriding the |
stanhu
added a commit
to stanhu/grape
that referenced
this issue
Jul 10, 2020
Cache-Control HTTP header with `no-cache`, even if the response wasn't a stream. To fix this, we only set HTTP headers if there is an actual stream. Closes ruby-grape#2087
stanhu
added a commit
to stanhu/grape
that referenced
this issue
Jul 10, 2020
The pull request ruby-grape#1520 introduced a regression that always caused the `Cache-Control` HTTP header to be set to `no-cache`, even if the response wasn't a stream. To fix this, we only set HTTP headers if there is an actual stream. Closes ruby-grape#2087
stanhu
added a commit
to stanhu/grape
that referenced
this issue
Jul 11, 2020
The pull request ruby-grape#1520 introduced a regression that always caused the `Cache-Control` HTTP header to be set to `no-cache`, even if the response wasn't a stream. To fix this, we only set HTTP headers if there is an actual stream. Closes ruby-grape#2087
stanhu
added a commit
to stanhu/grape
that referenced
this issue
Jul 13, 2020
The pull request ruby-grape#1520 introduced a regression that always caused the `Cache-Control` HTTP header to be set to `no-cache`, even if the response wasn't a stream. To fix this, we only set HTTP headers if there is an actual stream. Closes ruby-grape#2087
stanhu
added a commit
to stanhu/grape
that referenced
this issue
Jul 13, 2020
The pull request ruby-grape#1520 introduced a regression that always caused the `Cache-Control` HTTP header to be set to `no-cache`, even if the response wasn't a stream. To fix this, we only set HTTP headers if there is an actual stream. Closes ruby-grape#2087
stanhu
added a commit
to stanhu/grape
that referenced
this issue
Jul 13, 2020
The pull request ruby-grape#1520 introduced a regression that always caused the `Cache-Control` HTTP header to be set to `no-cache`, even if the response wasn't a stream. To fix this, we only set HTTP headers if there is an actual stream. Closes ruby-grape#2087
Got the exact same problem. Good to see it's already fixed 👏 waiting for the next release then ;) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Grape v1.4.0 https://github.com/ruby-grape/grape/pull/1520/files#diff-8e15cddb80f42ca7d43872846d80ecbeR275 broke our test suite because
Cache-Control
is always set tono-cache
ingrape/lib/grape/dsl/inside_route.rb
Line 333 in 84d68bd
We set
Cache-Control
tomax-age=0, private, must-revalidate, no-store, no-cache
.Maybe we should append
no-cache
only if isn't present? Or maybe the headers shouldn't be touched ifnil
is returned?The text was updated successfully, but these errors were encountered: