Эх сурвалжийг харах

Stop using newlines when base64 encoding content

Using the default setting of not specifying a newline separator means
the b64 encoded data is split with newlines every 76 characters. In
Selenium 3.0.0b2, this is apparently unacceptable; deliberately
specifying not to use any newline separator works around this issue.
Daniel Gempesaw 9 жил өмнө
parent
commit
0a1a0c50f8

+ 1 - 1
lib/Selenium/Firefox/Profile.pm

@@ -247,7 +247,7 @@ sub _encode {
         die 'write error';
     }
 
-    return encode_base64($string);
+    return encode_base64($string, '');
 }
 
 sub _layout_on_disk {

+ 1 - 1
lib/Selenium/Remote/Driver.pm

@@ -2617,7 +2617,7 @@ sub _prepare_file {
     }
 
     return {
-        file => MIME::Base64::encode_base64($string)          # base64-encoded string
+        file => MIME::Base64::encode_base64($string, '')
     };
 }