From 47372190dc5982739ae568534dfb01b178a08af8 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 11 Oct 2007 07:37:10 +0000 Subject: httputil: beware that content-type header may be absent --- lib/rbot/core/utils/httputil.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rbot') diff --git a/lib/rbot/core/utils/httputil.rb b/lib/rbot/core/utils/httputil.rb index 00164616..3b12a976 100644 --- a/lib/rbot/core/utils/httputil.rb +++ b/lib/rbot/core/utils/httputil.rb @@ -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 -- cgit v1.2.3