13 Commits

Author SHA1 Message Date
e7ac723545
Allow clients to cache OPTIONS results for 2 hours
Clients that use Fetch can cache the results of OPTIONS requests, based
on the value of `Access-Control-Max-Age`.

https://fetch.spec.whatwg.org/#http-access-control-max-age

/ht @DougReeder: https://github.com/remotestorage/armadietto/pull/86
2022-05-13 14:21:54 +02:00
9c560eb978
Fix circular require 2022-05-13 13:55:16 +02:00
ce7ebff73b
Fix deprecation warnings in specs 2022-05-13 13:52:21 +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
331fdbe1c7 Add specs for public resources, including getting partial content 2020-01-03 18:17:19 +01: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
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
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
Garret Alfert
533c9b6346 Set Content-type header on HEAD requests
Fixes #121
2018-05-22 11:59:55 +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
5da0d0b5c3 Delete unused methods 2018-04-30 15:44:49 +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