summaryrefslogtreecommitdiff
path: root/lib/webrick/httputils.rb
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-22 01:08:05 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-22 01:08:05 +0000
commitf2aa7f409aa2130888ceed21d128523e4392084a (patch)
tree2354a930439494c18ca548ea7a965fa4cdd96ca3 /lib/webrick/httputils.rb
parent1ad355bd53653161e705e7d919b3ad1ea793a3f5 (diff)
webrick/httputils: note Kernel#open behavior
I don't know who uses the load_mime_types method; but it is conceivable that a user would want to read the results of a command instead of reading a regular file to load MIME types. None of the WEBrick-related code in Ruby or default/bundled gems seems to rely on this method; but it is likely 3rd-party code does. * lib/webrick/httputils.rb (load_mime_types): note Kernel#open behavior [Misc #14216] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/webrick/httputils.rb')
-rw-r--r--lib/webrick/httputils.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/webrick/httputils.rb b/lib/webrick/httputils.rb
index 586971dd06..a4cd3b48ee 100644
--- a/lib/webrick/httputils.rb
+++ b/lib/webrick/httputils.rb
@@ -108,6 +108,8 @@ module WEBrick
# Loads Apache-compatible mime.types in +file+.
def load_mime_types(file)
+ # note: +file+ may be a "| command" for now; some people may
+ # rely on this, but currently we do not use this method by default.
open(file){ |io|
hash = Hash.new
io.each{ |line|