webs 0.1.25 → 0.1.26
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/controller/webs_controller.rb +9 -0
- data/lib/webs.rb +1 -1
- data/webs.gemspec +1 -1
- metadata +1 -1
data/Rakefile
CHANGED
@@ -138,6 +138,15 @@ module Webs
|
|
138
138
|
def set_fw_params
|
139
139
|
params.merge!( FW_PARAMS ) if defined?( FW_PARAMS )
|
140
140
|
end
|
141
|
+
|
142
|
+
# NOTE: bots & perl scripts are getting bad format in the request headers
|
143
|
+
# generally in the form: :formats=>["charset=iso-8859-1"]
|
144
|
+
# Just force those to html
|
145
|
+
# ex: https://freewebs.hoptoadapp.com/errors/4334788
|
146
|
+
# ex mime type inspection: #<Mime::Type:0x765a7159 @synonyms=[], @string="charset=iso-8859-1", @symbol=nil>
|
147
|
+
def fix_request_format
|
148
|
+
request.format = :html if request.format.blank? || request.format.to_s =~ /^charset/i
|
149
|
+
end
|
141
150
|
end
|
142
151
|
end
|
143
152
|
end
|
data/lib/webs.rb
CHANGED
data/webs.gemspec
CHANGED