rack-host-redirect 1.2 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rack/host_redirect.rb +2 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5fb6542ad2bd4e616e14c8707e257631d5d8b41d
4
- data.tar.gz: 9049c9f3270af53ae3ab186c10dfc22217a5a986
3
+ metadata.gz: 479c296ac20678a7529ac56a7dc6cb386f24c694
4
+ data.tar.gz: 0e97489699cf6e05e24da9d6d729eb0f2439803f
5
5
  SHA512:
6
- metadata.gz: bcdcc7f90caac858ee69004ced4c86834e75872624a5025129c4ad294b6ae1e59a350b38447793261206c8bb530b706574caf1a5f8816d0f277626a884919c28
7
- data.tar.gz: e142502f621e2e72b91f5bb20552a2c0d5f691107df77e458d576ce6ffdf2e0fa154cad86a8925758fb66c5c052b42a8cec0168f08fa38caae6da74714d3929d
6
+ metadata.gz: 4693798c482dc943f0e593fa041b2cb40d65199c31e3c3d98c672d0e3826e07fa1d94b030cb06c7b89c9cf3ba711888700d49a7f5e9d59efbec44e5be4f77ddd
7
+ data.tar.gz: 03221705bb00aec8bc9164cf892d1f5bbeb99176ba5e3f1c563ae7849319039c4f3d93d6c4f4c3edf8f0801c5e82e559e0f596be7194a35f5e226e0af9cd6881
@@ -14,7 +14,7 @@ class Rack::HostRedirect
14
14
 
15
15
  if updated_uri_opts = @host_mapping[host]
16
16
  location = update_url(request.url, updated_uri_opts)
17
- [301, {'Location' => location}, []]
17
+ [301, {'Location' => location, 'Content-Type' => 'text/html', 'Content-Length' => '0'}, []]
18
18
  else
19
19
  @app.call(env)
20
20
  end
@@ -36,7 +36,7 @@ class Rack::HostRedirect
36
36
  oldhost = oldhost.downcase
37
37
 
38
38
  if oldhost == opts[:host]
39
- raise ArgumentError, "Circular redirect to #{oldhost}"
39
+ raise ArgumentError, "#{oldhost.inspect} is being redirected to itself"
40
40
  else
41
41
  out[oldhost] = opts
42
42
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-host-redirect
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.2'
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geoff Buesing