Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4616

How to pass raw binary data to the put() method of rack/test?

$
0
0

I'm doing this:

require 'rack/test'data = # some binary data, for example, ZIP archiveput('/foo', data, 'content_type' => 'application/octet-stream')

Works just fine, until I put the % symbol into the data. In this case, I get this:

Invalid query parameters: invalid %-encoding ... (long exception text)

I don't want to Base64-encode or to CGI-encode my data, because the server-side code works just fine without the test. The problem is the way I'm using Rack. Somehow I have to inform it not to touch my data and send it "as is" to Sinatra. How?


Viewing all articles
Browse latest Browse all 4616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>