diff --git a/library/Requests/Exception/Transport/cURL/Easy/1.php b/library/Requests/Exception/Transport/cURL/Easy/1.php index 415d5328d..fd4158eb7 100644 --- a/library/Requests/Exception/Transport/cURL/Easy/1.php +++ b/library/Requests/Exception/Transport/cURL/Easy/1.php @@ -23,5 +23,5 @@ class Requests_Exception_Transport_cURL_Easy_1 extends Requests_Exception_Transp * * @var string */ - protected $reason = 'The URL you passed to libcurl used a protocol that this libcurl does not support. The support might be a compile-time option that you didn't use, it can be a misspelled protocol string or just a protocol libcurl has no code for.'; + protected $reason = 'The URL you passed to libcurl used a protocol that this libcurl does not support. The support might be a compile-time option that you didn\'t use, it can be a misspelled protocol string or just a protocol libcurl has no code for.'; } diff --git a/library/Requests/Exception/Transport/cURL/Easy/18.php b/library/Requests/Exception/Transport/cURL/Easy/18.php index 705b8d686..cc0a704c5 100644 --- a/library/Requests/Exception/Transport/cURL/Easy/18.php +++ b/library/Requests/Exception/Transport/cURL/Easy/18.php @@ -23,5 +23,5 @@ class Requests_Exception_Transport_cURL_Easy_18 extends Requests_Exception_Trans * * @var string */ - protected $reason = 'A file transfer was shorter or larger than expected. This happens when the server first reports an expected transfer size, and then delivers data that doesn't match the previously given size.'; + protected $reason = 'A file transfer was shorter or larger than expected. This happens when the server first reports an expected transfer size, and then delivers data that doesn\'t match the previously given size.'; } diff --git a/library/Requests/Exception/Transport/cURL/Easy/19.php b/library/Requests/Exception/Transport/cURL/Easy/19.php index 16074f9db..5f8520a02 100644 --- a/library/Requests/Exception/Transport/cURL/Easy/19.php +++ b/library/Requests/Exception/Transport/cURL/Easy/19.php @@ -23,5 +23,5 @@ class Requests_Exception_Transport_cURL_Easy_19 extends Requests_Exception_Trans * * @var string */ - protected $reason = 'This was either a weird reply to a 'RETR' command or a zero byte transfer complete.'; + protected $reason = 'This was either a weird reply to a \'RETR\' command or a zero byte transfer complete.'; } diff --git a/library/Requests/Exception/Transport/cURL/Easy/2.php b/library/Requests/Exception/Transport/cURL/Easy/2.php index b7f3e1b1f..972e6b8c9 100644 --- a/library/Requests/Exception/Transport/cURL/Easy/2.php +++ b/library/Requests/Exception/Transport/cURL/Easy/2.php @@ -23,5 +23,5 @@ class Requests_Exception_Transport_cURL_Easy_2 extends Requests_Exception_Transp * * @var string */ - protected $reason = 'Very early initialization code failed. This is likely to be an internal error or problem, or a resource problem where something fundamental couldn't get done at init time.'; + protected $reason = 'Very early initialization code failed. This is likely to be an internal error or problem, or a resource problem where something fundamental couldn\'t get done at init time.'; } diff --git a/library/Requests/Exception/Transport/cURL/Easy/25.php b/library/Requests/Exception/Transport/cURL/Easy/25.php index 902eef996..168e2f385 100644 --- a/library/Requests/Exception/Transport/cURL/Easy/25.php +++ b/library/Requests/Exception/Transport/cURL/Easy/25.php @@ -23,5 +23,5 @@ class Requests_Exception_Transport_cURL_Easy_25 extends Requests_Exception_Trans * * @var string */ - protected $reason = 'Failed starting the upload. For FTP, the server typically denied the STOR command. The error buffer usually contains the server's explanation for this.'; + protected $reason = 'Failed starting the upload. For FTP, the server typically denied the STOR command. The error buffer usually contains the server\'s explanation for this.'; } diff --git a/library/Requests/Exception/Transport/cURL/Easy/30.php b/library/Requests/Exception/Transport/cURL/Easy/30.php index c962efbb6..10043b052 100644 --- a/library/Requests/Exception/Transport/cURL/Easy/30.php +++ b/library/Requests/Exception/Transport/cURL/Easy/30.php @@ -23,5 +23,5 @@ class Requests_Exception_Transport_cURL_Easy_30 extends Requests_Exception_Trans * * @var string */ - protected $reason = 'The FTP PORT command returned error. This mostly happens when you haven't specified a good enough address for libcurl to use. See CURLOPT_FTPPORT.'; + protected $reason = 'The FTP PORT command returned error. This mostly happens when you haven\'t specified a good enough address for libcurl to use. See CURLOPT_FTPPORT.'; } diff --git a/library/Requests/Exception/Transport/cURL/Easy/37.php b/library/Requests/Exception/Transport/cURL/Easy/37.php index eebd07dc8..c8201708b 100644 --- a/library/Requests/Exception/Transport/cURL/Easy/37.php +++ b/library/Requests/Exception/Transport/cURL/Easy/37.php @@ -23,5 +23,5 @@ class Requests_Exception_Transport_cURL_Easy_37 extends Requests_Exception_Trans * * @var string */ - protected $reason = 'A file given with FILE:// couldn't be opened. Most likely because the file path doesn't identify an existing file. Did you check file permissions?'; + protected $reason = 'A file given with FILE:// couldn\'t be opened. Most likely because the file path doesn\'t identify an existing file. Did you check file permissions?'; } diff --git a/library/Requests/Exception/Transport/cURL/Easy/45.php b/library/Requests/Exception/Transport/cURL/Easy/45.php index 0022c56e0..bff49adeb 100644 --- a/library/Requests/Exception/Transport/cURL/Easy/45.php +++ b/library/Requests/Exception/Transport/cURL/Easy/45.php @@ -23,5 +23,5 @@ class Requests_Exception_Transport_cURL_Easy_45 extends Requests_Exception_Trans * * @var string */ - protected $reason = 'Interface error. A specified outgoing interface could not be used. Set which interface to use for outgoing connections' source IP address with CURLOPT_INTERFACE.'; + protected $reason = 'Interface error. A specified outgoing interface could not be used. Set which interface to use for outgoing connections\' source IP address with CURLOPT_INTERFACE.'; } diff --git a/library/Requests/Exception/Transport/cURL/Easy/5.php b/library/Requests/Exception/Transport/cURL/Easy/5.php index 7409f6955..b13744658 100644 --- a/library/Requests/Exception/Transport/cURL/Easy/5.php +++ b/library/Requests/Exception/Transport/cURL/Easy/5.php @@ -23,5 +23,5 @@ class Requests_Exception_Transport_cURL_Easy_5 extends Requests_Exception_Transp * * @var string */ - protected $reason = 'Couldn't resolve proxy. The given proxy host could not be resolved.'; + protected $reason = 'Couldn\'t resolve proxy. The given proxy host could not be resolved.'; } diff --git a/library/Requests/Exception/Transport/cURL/Easy/51.php b/library/Requests/Exception/Transport/cURL/Easy/51.php index 1977e467d..5ba5c33c6 100644 --- a/library/Requests/Exception/Transport/cURL/Easy/51.php +++ b/library/Requests/Exception/Transport/cURL/Easy/51.php @@ -23,5 +23,5 @@ class Requests_Exception_Transport_cURL_Easy_51 extends Requests_Exception_Trans * * @var string */ - protected $reason = 'The remote server's SSL certificate or SSH md5 fingerprint was deemed not OK.'; + protected $reason = 'The remote server\'s SSL certificate or SSH md5 fingerprint was deemed not OK.'; } diff --git a/library/Requests/Exception/Transport/cURL/Easy/53.php b/library/Requests/Exception/Transport/cURL/Easy/53.php index dc5f71c17..c0855c054 100644 --- a/library/Requests/Exception/Transport/cURL/Easy/53.php +++ b/library/Requests/Exception/Transport/cURL/Easy/53.php @@ -23,5 +23,5 @@ class Requests_Exception_Transport_cURL_Easy_53 extends Requests_Exception_Trans * * @var string */ - protected $reason = 'The specified crypto engine wasn't found.'; + protected $reason = 'The specified crypto engine wasn\'t found.'; } diff --git a/library/Requests/Exception/Transport/cURL/Easy/59.php b/library/Requests/Exception/Transport/cURL/Easy/59.php index 668777ae5..3f226dcb1 100644 --- a/library/Requests/Exception/Transport/cURL/Easy/59.php +++ b/library/Requests/Exception/Transport/cURL/Easy/59.php @@ -23,5 +23,5 @@ class Requests_Exception_Transport_cURL_Easy_59 extends Requests_Exception_Trans * * @var string */ - protected $reason = 'Couldn't use specified cipher.'; + protected $reason = 'Couldn\'t use specified cipher.'; } diff --git a/library/Requests/Exception/Transport/cURL/Easy/6.php b/library/Requests/Exception/Transport/cURL/Easy/6.php index 51bd20a21..080142f42 100644 --- a/library/Requests/Exception/Transport/cURL/Easy/6.php +++ b/library/Requests/Exception/Transport/cURL/Easy/6.php @@ -23,5 +23,5 @@ class Requests_Exception_Transport_cURL_Easy_6 extends Requests_Exception_Transp * * @var string */ - protected $reason = 'Couldn't resolve host. The given remote host was not resolved.'; + protected $reason = 'Couldn\'t resolve host. The given remote host was not resolved.'; } diff --git a/library/Requests/Exception/Transport/cURL/Easy/81.php b/library/Requests/Exception/Transport/cURL/Easy/81.php index 5d32475d0..13fef7881 100644 --- a/library/Requests/Exception/Transport/cURL/Easy/81.php +++ b/library/Requests/Exception/Transport/cURL/Easy/81.php @@ -23,5 +23,5 @@ class Requests_Exception_Transport_cURL_Easy_81 extends Requests_Exception_Trans * * @var string */ - protected $reason = 'Socket is not ready for send/recv wait till it's ready and try again. This return code is only returned from curl_easy_recv and curl_easy_send (Added in 7.18.2)'; + protected $reason = 'Socket is not ready for send/recv wait till it\'s ready and try again. This return code is only returned from curl_easy_recv and curl_easy_send (Added in 7.18.2)'; } diff --git a/library/Requests/Exception/Transport/cURL/Multi/2.php b/library/Requests/Exception/Transport/cURL/Multi/2.php index 063cab130..7a0c2672a 100644 --- a/library/Requests/Exception/Transport/cURL/Multi/2.php +++ b/library/Requests/Exception/Transport/cURL/Multi/2.php @@ -23,5 +23,5 @@ class Requests_Exception_Transport_cURL_Multi_2 extends Requests_Exception_Trans * * @var string */ - protected $reason = 'An easy handle was not good/valid. It could mean that it isn't an easy handle at all, or possibly that the handle already is in used by this or another multi handle.'; + protected $reason = 'An easy handle was not good/valid. It could mean that it isn\'t an easy handle at all, or possibly that the handle already is in used by this or another multi handle.'; } diff --git a/library/Requests/Exception/Transport/cURL/Share/5.php b/library/Requests/Exception/Transport/cURL/Share/5.php index fb8e54010..7caf61f89 100644 --- a/library/Requests/Exception/Transport/cURL/Share/5.php +++ b/library/Requests/Exception/Transport/cURL/Share/5.php @@ -23,5 +23,5 @@ class Requests_Exception_Transport_cURL_Share_5 extends Requests_Exception_Trans * * @var string */ - protected $reason = 'The requested sharing could not be done because the library you use don't have that particular feature enabled. (Added in 7.23.0)'; + protected $reason = 'The requested sharing could not be done because the library you use don\'t have that particular feature enabled. (Added in 7.23.0)'; } diff --git a/library/Requests/Exception/generate_curl_exceptions.py b/library/Requests/Exception/generate_curl_exceptions.py index 3b8840e73..70bcfd1e2 100644 --- a/library/Requests/Exception/generate_curl_exceptions.py +++ b/library/Requests/Exception/generate_curl_exceptions.py @@ -57,7 +57,7 @@ class Requests_Exception_Transport_cURL_TYPE_CODE extends Requests_Exception_Tra * * @var string */ - protected $reason = 'REASON'; + protected $reason = 'REASON_ESCAPED'; } ''' @@ -70,5 +70,5 @@ class Requests_Exception_Transport_cURL_TYPE_CODE extends Requests_Exception_Tra if int(code) <= 0: continue with (p / t / (code + '.php')).open('wb') as f: - out = template.replace('CODE', code).replace('TYPE', t).replace('REASON', reason).replace('CONSTANT', constant) + out = template.replace('CODE', code).replace('TYPE', t).replace('REASON_ESCAPED', reason.encode('string-escape')).replace('REASON', reason).replace('CONSTANT', constant) f.write(out)