]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
httputil: beware that content-type header may be absent
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 11 Oct 2007 07:37:10 +0000 (07:37 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 11 Oct 2007 07:37:10 +0000 (07:37 +0000)
lib/rbot/core/utils/httputil.rb

index 00164616cfba7f2f068adbd84bd4988495c293b9..3b12a9768d5af693d67c4e85cd54cb7a775e1bd1 100644 (file)
@@ -39,7 +39,7 @@ module ::Net
 
       charsets = ['latin1'] # should be in config
 
-      if self['content-type'].match(/charset=["']?([^\s"']+)["']?/i)
+      if ctype.match(/charset=["']?([^\s"']+)["']?/i)
         charsets << $1
         debug "charset #{charsets.last} added from header"
       end