#9474: Integrate OpenID authentication support to TYPO3
[Packages/TYPO3.CMS.git] / typo3 / sysext / openid / lib / php-openid / php-openid-typo3.patch
1 diff -b -r -u Auth/Yadis/ParanoidHTTPFetcher.php Auth/Yadis/ParanoidHTTPFetcher.php\r
2 --- Auth/Yadis/ParanoidHTTPFetcher.php  2008-09-09 21:12:13.000000000 +0200\r
3 +++ Auth/Yadis/ParanoidHTTPFetcher.php  2008-09-24 22:24:11.000000000 +0200\r
4 @@ -130,6 +130,19 @@\r
5              curl_setopt($c, CURLOPT_RANGE, \r
6                          "0-".(1024 * Auth_OpenID_FETCHER_MAX_RESPONSE_KB));\r
7  \r
8 +                       // <TYPO3-specific>\r
9 +                       if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyServer']) {\r
10 +                               curl_setopt($c, CURLOPT_PROXY, $GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyServer']);\r
11 +\r
12 +                               if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyTunnel']) {\r
13 +                                       curl_setopt($c, CURLOPT_HTTPPROXYTUNNEL, $GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyTunnel']);\r
14 +                               }\r
15 +                               if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyUserPass']) {\r
16 +                                       curl_setopt($c, CURLOPT_PROXYUSERPWD, $GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyUserPass']);\r
17 +                               }\r
18 +                       }\r
19 +                       // </TYPO3-specific>\r
20 +\r
21              curl_exec($c);\r
22  \r
23              $code = curl_getinfo($c, CURLINFO_HTTP_CODE);\r
24 @@ -194,6 +207,19 @@\r
25          curl_setopt($c, CURLOPT_WRITEFUNCTION,\r
26                      array(&$this, "_writeData"));\r
27  \r
28 +               // <TYPO3-specific>\r
29 +               if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyServer']) {\r
30 +                       curl_setopt($c, CURLOPT_PROXY, $GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyServer']);\r
31 +\r
32 +                       if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyTunnel']) {\r
33 +                               curl_setopt($c, CURLOPT_HTTPPROXYTUNNEL, $GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyTunnel']);\r
34 +                       }\r
35 +                       if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyUserPass']) {\r
36 +                               curl_setopt($c, CURLOPT_PROXYUSERPWD, $GLOBALS['TYPO3_CONF_VARS']['SYS']['curlProxyUserPass']);\r
37 +                       }\r
38 +               }\r
39 +               // </TYPO3-specific>\r
40 +\r
41          curl_exec($c);\r
42  \r
43          $code = curl_getinfo($c, CURLINFO_HTTP_CODE);\r