Open Tobion opened 6 years ago
Good point. I think we should simply ignore reserved characters for all operating systems, when fetching the path information from the URI.
Btw, the https://github.com/csarrazi/guzzle-cache-middleware/blob/master/src/Adapter/MockStorageAdapter.php does not seem necessary. You could use the https://github.com/csarrazi/guzzle-cache-middleware/blob/master/src/Adapter/PsrAdapter.php also for the mock storage. In the https://github.com/csarrazi/CsaGuzzleBundle you could use the symfony filesystem cache adapter without ttl and the IdentityMarshaller (or a custom one for responses).
This way the library also wouldn't need to worry about such things like invalid chars. But the cache key would usually not translate to the filename as the key is likely hashed.
When there are special characters in the URI path that are not allowed by the filesystem (like
:
on Windows), the MockStorageAdapter using SubfolderNamingStrategy fails withAnd unfortunately one cannot reconfigure the adapters, making the caching / mocking unusable.