435 Commits

Author SHA1 Message Date
153176fb15
Merge pull request #138 from 5apps/feature/137-validate_content-type_put
Validate the Content-Type on PUT requests
2020-04-15 15:09:27 +02:00
Greg Karékinian
c2d5fc9e07 Move the Content-Type format validation with the other validations 2020-04-15 14:23:12 +02:00
Greg Karékinian
71d138894e Validate the Content-Type on PUT requests
Return a 415
(https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/415) when the
Content-Type does not look like a valid MIME type (in the type/subtype
format)

Refs #137
2020-04-15 13:49:33 +02:00
ab673f1d43
Merge pull request #134 from 5apps/feature/82-content_range_poc
Content-Range support
2020-01-08 14:53:10 -05:00
Greg Karékinian
1824766a03 Implement Range support for the Swift provider, with specs 2020-01-06 14:03:26 +01:00
Greg Karékinian
331fdbe1c7 Add specs for public resources, including getting partial content 2020-01-03 18:17:19 +01:00
Greg Karékinian
8c95e804ca Add support for partial responses
Set the Content-Range response header and return a 206 status if it is a
partial response (a Range was passed)
2020-01-02 18:24:12 +01:00
Greg Karékinian
da7f077300 Pass the Range HTTP header to GET requests if present 2020-01-02 18:23:47 +01:00
Greg Karékinian
ee16f5deb1 Add new headers
Add Range to allow headers, Content-Range to expose headers and the
Accept-Ranges header
2020-01-02 18:21:07 +01:00
Greg Karékinian
a5691c0660
Merge pull request #132 from 5apps/chore/update_gems
Update gems and remove global expectations from the specs
2020-01-02 16:35:26 +01:00
Greg Karékinian
585465f37b Do not test on Ruby 2.4 anymore
activesupport 6 requires Ruby 2.5
2019-12-19 11:46:03 +01:00
Greg Karékinian
1694e3cdc3 Merge branch 'master' into chore/update_gems 2019-12-19 11:45:39 +01:00
f1b66d3bac
Merge pull request #133 from 5apps/dependabot/bundler/rack-2.0.8
Bump rack from 2.0.7 to 2.0.8
2019-12-19 10:37:49 +01:00
dependabot[bot]
12b9a0d68b
Bump rack from 2.0.7 to 2.0.8
Bumps [rack](https://github.com/rack/rack) from 2.0.7 to 2.0.8.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/2.0.7...2.0.8)

Signed-off-by: dependabot[bot] <support@github.com>
2019-12-19 00:33:36 +00:00
Greg Karékinian
01927fd5ca Remove global expectations that were deprecated in minitest 5.12.0
They will be removed from minitest 6

Changelog:
https://github.com/seattlerb/minitest/blob/master/History.rdoc#5120--2019-09-22
2019-11-13 16:36:29 +01:00
Greg Karékinian
01a4712187 Update gems 2019-11-13 16:32:38 +01:00
Greg Karékinian
500af513e8 Update gems (#131)
* Update the redis gem

Redis 4.1.1 includes https://github.com/redis/redis-rb/pull/829 which
fixing trying to connect to slaves marked as down

* Update the rainbows gem

* Update the mime-types and mime-types-data gems

* Update the webmock, rack-test and rake gems

* Update the sentry-raven gem

* Update the activesupport gem

* Update the backports gem

* Update the domain_name gem

* Update the method_source gem
2019-07-31 11:51:33 +02:00
Greg Karékinian
7da2431ccc
Merge pull request #130 from 5apps/feature/more_rubies_specs
Run the specs on Ruby 2.5 and 2.6 too
2019-01-31 12:02:50 +01:00
Greg Karékinian
00c17743b6 Run the specs on Ruby 2.5 and 2.6 too 2019-01-31 11:51:16 +01:00
Greg Karékinian
a161302522
Merge pull request #129 from 5apps/gem_update
Update sinatra and rack gems
2019-01-16 17:14:43 +01:00
Greg Karékinian
01737f8b58 Update sinatra and rack gems
Security updates
2019-01-16 17:11:23 +01:00
0b1a62f49a
Merge pull request #127 from 5apps/bugfix/fix_get_request_headers
Set the response headers from Redis metadata on GET requests
2018-11-26 12:11:47 +01:00
Garret Alfert
394c802ec2 Fix spec
ETag is used from Redis metadata now, not from the storage server's
response.
2018-11-26 11:57:41 +01:00
Garret Alfert
575f4a87be Set the response headers from Redis metadata on GET 2018-11-26 11:33:21 +01:00
Greg Karékinian
2e02bdfb7b Revert "Update dependencies"
This reverts commit b29953c59a0ecaaafe5f58b4f32cbe75adbea5d9.

This appears to disable hashes with indifferent access on staging,
trying to find which gem update broke this
2018-07-19 12:45:14 +02:00
Greg Karékinian
41e3c0299a
Merge pull request #124 from 5apps/no_head_for_last-modified
Do not do an extra HEAD request after a PUT for Last-Modified
2018-07-19 10:22:43 +02:00
Greg Karékinian
2b3f700d75
Merge pull request #125 from 5apps/update_dependencies_sinatra
Update dependencies
2018-07-18 19:46:06 +02:00
Greg Karékinian
b29953c59a Update dependencies
There is a security issue in Sinatra 2.0.1
2018-07-18 19:41:53 +02:00
Greg Karékinian
d05cd4a760 Do not do an extra HEAD request after a PUT for Last-Modified
Use the Date header from a PUT request as the Last-Modified time that we
store in Redis
2018-07-18 19:37:05 +02:00
15ff64ea9e
Merge pull request #123 from 5apps/bugfix/head_content_length
Set the Content-Length on HEAD requests
2018-05-22 15:36:42 +02:00
Greg Karékinian
b4ad4c4793 Set the Content-Length on a HEAD requests
We get it as part of the Redis metadata

RFC: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
2018-05-22 12:44:24 +02:00
28f003c20b
Merge pull request #122 from 5apps/bugfix/121-set_content_type_on_head
Set Content-Type header on HEAD requests
2018-05-22 12:11:51 +02:00
Garret Alfert
533c9b6346 Set Content-type header on HEAD requests
Fixes #121
2018-05-22 11:59:55 +02:00
6708872a16
Merge pull request #119 from 5apps/doc/readme
Improve README
2018-05-18 10:37:13 +02:00
0f91c8c27e Improve README
Update for new backend, improve text in general.
2018-05-11 15:35:33 +02:00
1705ac7347
Merge pull request #118 from 5apps/feature/112-s3_cleaned_up
Add support for S3 through the REST API
2018-05-11 15:24:06 +02:00
Greg Karékinian
be33b0e195 Replace placeholder comment that I forgot to replace 2018-05-09 19:08:32 +02:00
Greg Karékinian
df65190df8 Simply the request stubs, add comments
Remove the stubs that are not required, making everything easier to
understand
2018-05-09 18:42:04 +02:00
Greg Karékinian
c0d88f1da6 Run Travis builds on the Docker infrastructure 2018-05-09 16:18:22 +02:00
Greg Karékinian
639c3724f0 Refactor the put_request method to have a return value 2018-05-09 16:01:14 +02:00
Greg Karékinian
709f63555d Rewrite to avoid long lines 2018-05-09 15:55:00 +02:00
Greg Karékinian
0ec76c8140 Fix coding style for a hash 2018-05-09 15:26:32 +02:00
Greg Karékinian
d0a28c7111 Remove useless comments and remove duplicate section in the example configs 2018-05-09 15:21:51 +02:00
Greg Karékinian
a92286703d Uncomment the development config in the examples 2018-04-30 16:46:28 +02:00
Greg Karékinian
f14ef4dc21 Consider that the metadata has changed when the Last-Modified changes
Also adds a spec for it
2018-04-30 16:39:12 +02:00
Greg Karékinian
ca0127d6a6 Rename the S3 provider to just S3 2018-04-30 15:46:18 +02:00
Greg Karékinian
5da0d0b5c3 Delete unused methods 2018-04-30 15:44:49 +02:00
Greg Karékinian
454f02dfaf Rename the spec root description 2018-04-30 15:44:28 +02:00
Greg Karékinian
1532a23d29 Reorder the argument in authorization_headers_for
Make content_type and md5 optional (set to nil by default)
2018-04-30 15:30:16 +02:00
Greg Karékinian
97cd5ec837 Move a comment to the relevant line 2018-04-30 15:15:04 +02:00