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
req.basic_auth @credentials['user'], @credentials['password']
# TODO ensure content-type is 'raw', e.g. this way
# (but then querystring ?reference=... is lost)
# req.body = data_chunk
# req.content_type = 'application/octet-stream'
req.set_form_data('data_chunk' => data_chunk)
# When using 'application/x-www-form-urlencoded', Ruby encodes with regex
# and it is far too slow. Such POST is legit:
req.body = data_chunk
req.content_type = 'application/octet-stream'
@log.on_trace do
@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