Created
November 28, 2011 23:00
-
-
Save cainlevy/1402499 to your computer and use it in GitHub Desktop.
Delete HTTP_X_QUEUE_START for requests with large content lengths.
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
class QueueTimeMiddleware | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
if env['CONTENT_LENGTH'].to_i > 10000 | |
env['HTTP_X_QUEUE_START'] = nil | |
end | |
@app.call(env) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment