| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,26 @@ |
| 0 |
+require 'socket' |
|
| 1 |
+class TCPSocket |
|
| 2 |
+ def external_encoding |
|
| 3 |
+ Encoding::BINARY |
|
| 4 |
+ end |
|
| 5 |
+end |
|
| 6 |
+ |
|
| 7 |
+require 'rexml/source' |
|
| 8 |
+class REXML::IOSource |
|
| 9 |
+ alias_method :encoding_assign, :encoding= |
|
| 10 |
+ def encoding=(value) |
|
| 11 |
+ encoding_assign(value) if value |
|
| 12 |
+ end |
|
| 13 |
+end |
|
| 14 |
+ |
|
| 15 |
+begin |
|
| 16 |
+ # OpenSSL is optional and can be missing |
|
| 17 |
+ require 'openssl' |
|
| 18 |
+ class OpenSSL::SSL::SSLSocket |
|
| 19 |
+ def external_encoding |
|
| 20 |
+ Encoding::BINARY |
|
| 21 |
+ end |
|
| 22 |
+ end |
|
| 23 |
+rescue |
|
| 24 |
+# ignored |
|
| 25 |
+end |
|
| 0 | 26 |
\ No newline at end of file |