-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(v3): Bump discourse to v3 tag
- Loading branch information
Showing
4 changed files
with
110 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
diff --git a/lib/middleware/anonymous_cache.rb b/lib/middleware/anonymous_cache.rb | ||
index d41069c92e..fe968c6d64 100644 | ||
--- a/lib/middleware/anonymous_cache.rb | ||
+++ b/lib/middleware/anonymous_cache.rb | ||
@@ -318,7 +318,7 @@ module Middleware | ||
@@ -347,7 +347,7 @@ module Middleware | ||
return @app.call(env) if defined?(@@disabled) && @@disabled | ||
|
||
def call(env) | ||
if PAYLOAD_INVALID_REQUEST_METHODS.include?(env[Rack::REQUEST_METHOD]) && | ||
- env[Rack::RACK_INPUT].size > 0 | ||
+ env[Rack::RACK_INPUT].respond_to?(:size) && env[Rack::RACK_INPUT].size > 0 | ||
|
||
return [413, { "Cache-Control" => "private, max-age=0, must-revalidate" }, []] | ||
- env[Rack::RACK_INPUT].size > 0 | ||
+ env[Rack::RACK_INPUT].respond_to?(:size) && env[Rack::RACK_INPUT].size > 0 | ||
return 413, { "Cache-Control" => "private, max-age=0, must-revalidate" }, [] | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters