rtomayko / rack-cache

Real HTTP Caching for Ruby Web Apps
http://rtomayko.github.io/rack-cache/
Other
822 stars 126 forks source link

Query string empty string #151

Closed randallreedjr closed 6 years ago

randallreedjr commented 6 years ago

Rack uses to_s in the query_string method, meaning nil will be converted to an empty string. However, when checking for the presence of the query string, Rack::Cache uses .nil?. As a result, Rack::Cache currently appends '?' to cache keys, even if the request does not include a query string.

Here is the relevant code in Rack: https://github.com/rack/rack/blob/master/lib/rack/request.rb#L136

randallreedjr commented 6 years ago

@rtomayko Let me know what you think

grosser commented 6 years ago

1.7.2 is out!