diff options
author | Dmitry Kim <dmitry point kim at gmail point com> | 2007-08-10 12:53:40 +0000 |
---|---|---|
committer | Dmitry Kim <dmitry point kim at gmail point com> | 2007-08-10 12:53:40 +0000 |
commit | 34f90f7b9784f0abc2fd10be0aac62f5d25bd6af (patch) | |
tree | c1500a87cc9f43568d7c29c6f8419ce644b4493f /lib/rbot | |
parent | b640b14d732d457fec50b89738206a911ec9de7a (diff) |
* (httputils) moved encoding/charsets magic into httpres instances from the global class namespace
Diffstat (limited to 'lib/rbot')
-rw-r--r-- | lib/rbot/core/utils/httputil.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rbot/core/utils/httputil.rb b/lib/rbot/core/utils/httputil.rb index 448c8da1..1044b4b5 100644 --- a/lib/rbot/core/utils/httputil.rb +++ b/lib/rbot/core/utils/httputil.rb @@ -106,7 +106,7 @@ module ::Net end end - def body + def cooked_body return self.body_to_utf(self.decompress_body(self.raw_body)) end @@ -385,6 +385,9 @@ class HttpUtil warning ":| redirect w/o location?" end end + class << resp + alias :body :cooked_body + end if block_given? yield(resp) else |