Просмотр исходного кода

Added a Zend_Http_Client config option to strictly apply RFC 3986 when encoding a query string. This change is fundamentally necessary to ensure Zend_Oauth is compatible with strictly implemented OAuth Servers.
Fixes ZF-10197


git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23073 44c647ce-9c0f-0410-b52a-842ac1e357ba

padraic 15 лет назад
Родитель
Сommit
90f3a5fae8
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      library/Zend/Http/Client.php

+ 4 - 0
library/Zend/Http/Client.php

@@ -119,6 +119,7 @@ class Zend_Http_Client
         'strict'          => true,
         'output_stream'   => false,
         'encodecookies'   => true,
+        'rfc3986_strict'  => false
     );
 
     /**
@@ -950,6 +951,9 @@ class Zend_Http_Client
                        $query .= '&';
                    }
                 $query .= http_build_query($this->paramsGet, null, '&');
+                if ($this->config['rfc3986_strict']) {
+                    $query = str_replace('+', '%20', $query);
+                }
 
                 $uri->setQuery($query);
             }