Commit a1174f91 authored by Julien Muchembled's avatar Julien Muchembled Committed by Julien Muchembled

Fix severe performance issue by POSTing data as application/octet-stream

This depends on wendelin!28.

/reviewed-on !1
parent 4a4a6795
...@@ -41,11 +41,11 @@ class WendelinClient ...@@ -41,11 +41,11 @@ class WendelinClient
req.basic_auth @credentials['user'], @credentials['password'] req.basic_auth @credentials['user'], @credentials['password']
end end
# TODO ensure content-type is 'raw', e.g. this way # When using 'application/x-www-form-urlencoded', Ruby encodes with regex
# (but then querystring ?reference=... is lost) # and it is far too slow. Such POST is legit:
# req.body = data_chunk # https://stackoverflow.com/a/14710450
# req.content_type = 'application/octet-stream' req.body = data_chunk
req.set_form_data('data_chunk' => data_chunk) req.content_type = 'application/octet-stream'
@log.on_trace do @log.on_trace do
@log.trace '>>> REQUEST' @log.trace '>>> REQUEST'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment