Skip to content
Snippets Groups Projects

Use http read total timeout by default (logging errors rather than raising)

Merged Andy Schoenen requested to merge 334930_use-http-total-timeout-by-default into master
19 files
+ 41
32
Compare changes
  • Side-by-side
  • Inline
Files
19
  • 2e847531
    Removes the use_read_total_timeout option on Gitlab::HTTP
    and use read_total_timeout by default. The option was
    introduced for HTTP calls to URLs that could be defined
    by users in order to fix a security issue but have the
    smallest possible impact. It looks like the timeout
    implementation is stable so it can become the default
    option. The only exception where We don't want to use
    a read total timeout is when streaming potentially
    large responses.
@@ -17,7 +17,7 @@ def notify(message, opts)
class HTTPClient
def self.post(uri, params = {})
params.delete(:http_options) # these are internal to the client and we do not want them
Gitlab::HTTP.post(uri, body: params, use_read_total_timeout: true)
Gitlab::HTTP.post(uri, body: params)
end
end
end
Loading