1
0
Fork 0
mirror of https://github.com/rest-client/rest-client.git synced 2022-11-09 13:49:40 -05:00
rest-client--rest-client/lib
Andy Brody 0d5674d84a Switch to multipart boundary with more entropy.
The previous boundary used a random number up to 1,000,000 as the
boundary. This is extremely low entropy compared to what most major
browsers use (20 bits). Instead, use a convention more like WebKit.

RestClient previously would be completely unable to upload a file
generated like so, containing `--0--` through `--1000000--`:

    File.open('foo.txt', 'w') {|f|
      1_000_000.times {|i| f.write("--#{i}--\n") }}

Instead, the boundary now looks like this, with about 95 bits of entropy:
    `----RubyFormBoundaryFg2MqiXXQlT5RkUF`
2015-11-15 22:15:51 -08:00
..
restclient Switch to multipart boundary with more entropy. 2015-11-15 22:15:51 -08:00
rest-client.rb more logical way to require the library. Closes #20 2010-04-15 17:55:36 +02:00
rest_client.rb Merge commit 'technoweenie/multipart_streaming' into prereorg 2009-08-12 12:37:21 -04:00
restclient.rb Validate that proc passed to add_before_exec... 2015-06-09 23:53:09 -07:00