465 Commits

Author SHA1 Message Date
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
Greg Karékinian
3b72b8d0bb Pass the headers to the set_response_headers directly, not the response 2018-04-30 15:12:53 +02:00
Greg Karékinian
b00fc5bee2 Reverse the not found logic in the delete_data method to make it clearer 2018-04-30 15:10:55 +02:00
Greg Karékinian
21f3a9f60f Remove all duplication the specs
S3 and Swift now run the same specs. The only difference is the before
block that defines the stubbed HTTP requests and the responses from the
Swift and S3 servers
2018-04-26 13:17:43 +02:00
Greg Karékinian
21dad2aba7 Get the metadata from Redis on a HEAD request
No need to hit the storage backend, we can set the response headers from
the data in Redis
2018-04-26 13:17:43 +02:00
Greg Karékinian
7bd45543f6 Set headers from the Redis metadata on a GET that results in a 304
Also add specs to check for the response headers
2018-04-26 13:17:43 +02:00
Greg Karékinian
f083022e6d Get the ETag from Redis on a GET request
This prevents doing a network request when we would return a 304 anyway
2018-04-26 13:17:43 +02:00
Greg Karékinian
86dc45f444 Add support for S3 through the REST API
This is currently using the old S3 authentication
(https://s3.amazonaws.com/doc/s3-developer-guide/RESTAuthentication.html),
in order to support Exoscale Storage

Refs #112
2018-04-26 13:17:43 +02:00
842a8707e8
Merge pull request #116 from 5apps/update_dependencies_2
Update gem dependencies
2018-04-16 13:28:25 +02:00
Greg Karékinian
24b5bf0035 Update gem dependencies 2018-04-16 12:17:28 +02:00
ef8239eca0
Merge pull request #115 from 5apps/feature/75-remove_riak
Remove all Riak code and its dependencies
2018-04-16 12:06:52 +02:00
Greg Karékinian
ac6bec48c4 Remove all Riak code and its dependencies
Closes #75
2018-04-16 11:54:32 +02:00
e876f4ba52
Merge pull request #114 from 5apps/travis_update
Do not install Riak CS, run Travis builds on Trusty containers
2018-04-15 20:13:56 +02:00
Greg Karékinian
21061324dc Do not install Riak CS, run Travis builds on Trusty containers 2018-04-15 20:03:49 +02:00
60c508fba9
Add Last-Modified date to document items in listings
Not in RS spec draft yet, see https://github.com/remotestorage/spec/issues/158 for discussion.
2018-03-12 16:32:00 +02:00
c11310381a
Merge pull request #110 from 5apps/bugfix/redis_db_in_specs
Use all keys from the config file's redis section in the specs
2018-03-08 14:04:34 +02:00
Greg Karékinian
fac033cff5 Use all keys from the config file's redis section in the specs
You can pass a db index, and the code was using it, but not the specs
2018-03-08 12:59:03 +01:00
Greg Karékinian
b6bb36d7c2
Merge pull request #106 from 5apps/bugfix/handle_wrong_redis_metadata
Handle out of sync metadata in Redis on PUTs
2018-01-05 13:17:29 +01:00
Greg Karékinian
3ddcccaee7 Handle the case of a PUT on a non-existing object
The previous code was returning a 500 because the HEAD request failed
2018-01-05 13:11:47 +01:00
Garret Alfert
2fac808343 Split list of ETAGs before removing Weak indicator 2018-01-05 06:55:46 +01:00
Garret Alfert
18670021b1 Handle out of sync metadata in Redis on PUTs
When the IF-MATCH comparison fails, we check the actual metadata on
the Swift server to be sure.
2018-01-05 06:49:42 +01:00