rack-conneg 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/rack/conneg.rb +2 -2
  2. metadata +2 -2
data/lib/rack/conneg.rb CHANGED
@@ -5,7 +5,7 @@ module Rack #:nodoc:#
5
5
 
6
6
  class Conneg
7
7
 
8
- VERSION = '0.1.2'
8
+ VERSION = '0.1.3'
9
9
 
10
10
  def initialize(app)
11
11
  @app = app
@@ -70,7 +70,7 @@ module Rack #:nodoc:#
70
70
  # Find the first item in accept_types that matches a registered
71
71
  # content type
72
72
  accept_types.find { |t|
73
- re = %r{^#{t[:type].gsub(/\*/,'.+')}$}
73
+ re = %r{^#{Regexp.escape(t[:type].gsub(/\*/,'.+'))}$}
74
74
  @types.find { |type| re.match(type) ? mime_type = type : nil }
75
75
  }
76
76
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-conneg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael B. Klein
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-10 00:00:00 -08:00
12
+ date: 2010-03-03 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency