Changeset 3386

Show
Ignore:
Timestamp:
05/31/07 03:20:34 (20 months ago)
Author:
coolengineer
Message:

#378

PHP-Openid Library를 1.2.2로 올림 (기존1.2.1)
Global Variable관련한 패치가 공식적으로 지원됨.

Location:
trunk/plugins/CL_OpenID
Files:
13 modified

Legend:

Unmodified
Added
Removed
  • trunk/plugins/CL_OpenID/Auth/OpenID.php

    r3229 r3386  
    2323require_once "Services/Yadis/PlainHTTPFetcher.php"; 
    2424require_once "Services/Yadis/ParanoidHTTPFetcher.php"; 
     25require_once "Auth/OpenID/BigMath.php"; 
    2526 
    2627/** 
     
    9697       "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"); 
    9798 
    98 /** 
    99  * These namespaces are automatically fixed in query arguments by 
    100  * Auth_OpenID::fixArgs. 
    101  */ 
    102 global $_Auth_OpenID_namespaces; 
    103 $_Auth_OpenID_namespaces = array('openid', 
    104                                  'sreg'); 
     99if (Auth_OpenID_getMathLib() === null) { 
     100    if( !defined('Auth_OpenID_NO_MATH_SUPPORT') ) { 
     101        define('Auth_OpenID_NO_MATH_SUPPORT', true); 
     102    } 
     103} 
    105104 
    106105/** 
     
    113112 
    114113    /** 
     114     * These namespaces are automatically fixed in query arguments by 
     115     * Auth_OpenID::fixArgs. 
     116     */ 
     117    function getOpenIDNamespaces() 
     118    { 
     119        return array('openid', 
     120                     'sreg'); 
     121    } 
     122 
     123    /** 
    115124     * Rename query arguments back to 'openid.' from 'openid_' 
    116125     * 
     
    120129    function fixArgs($args) 
    121130    { 
    122         global $_Auth_OpenID_namespaces; 
    123131        foreach (array_keys($args) as $key) { 
    124132            $fixed = $key; 
    125133            if (preg_match('/^openid/', $key)) { 
    126                 foreach ($_Auth_OpenID_namespaces as $ns) { 
     134                foreach (Auth_OpenID::getOpenIDNamespaces() as $ns) { 
    127135                    if (preg_match('/'.$ns.'_/', $key)) { 
    128136                        $fixed = preg_replace('/'.$ns.'_/', $ns.'.', $fixed); 
  • trunk/plugins/CL_OpenID/Auth/OpenID/BigMath.php

    r3229 r3386  
    336336 * this array. 
    337337 */ 
     338global $_Auth_OpenID_math_extensions; 
    338339$_Auth_OpenID_math_extensions = array( 
    339340    array('modules' => array('gmp', 'php_gmp'), 
     
    429430        } 
    430431        $triedstr = implode(", ", $tried); 
    431         $msg = 'This PHP installation has no big integer math ' . 
    432             'library. Define Auth_OpenID_NO_MATH_SUPPORT to use ' . 
    433             'this library in dumb mode. Tried: ' . $triedstr; 
    434         trigger_error($msg, E_USER_ERROR); 
     432 
     433        define('Auth_OpenID_NO_MATH_SUPPORT', true); 
     434        return null; 
    435435    } 
    436436 
  • trunk/plugins/CL_OpenID/Auth/OpenID/DiffieHellman.php

    r3229 r3386  
    1818require_once 'Auth/OpenID/HMACSHA1.php'; 
    1919 
    20 $_Auth_OpenID_DEFAULT_MOD = '155172898181473697471232257763715539915724801'. 
    21 '966915404479707795314057629378541917580651227423698188993727816152646631'. 
    22 '438561595825688188889951272158842675419950341258706556549803580104870537'. 
    23 '681476726513255747040765857479291291572334510643245094715007229621094194'. 
    24 '349783925984760375594985848253359305585439638443'; 
     20function Auth_OpenID_getDefaultMod() 
     21{ 
     22    return '155172898181473697471232257763715539915724801'. 
     23        '966915404479707795314057629378541917580651227423'. 
     24        '698188993727816152646631438561595825688188889951'. 
     25        '272158842675419950341258706556549803580104870537'. 
     26        '681476726513255747040765857479291291572334510643'. 
     27        '245094715007229621094194349783925984760375594985'. 
     28        '848253359305585439638443'; 
     29} 
    2530 
    26 $_Auth_OpenID_DEFAULT_GEN = '2'; 
     31function Auth_OpenID_getDefaultGen() 
     32{ 
     33    return '2'; 
     34} 
    2735 
    2836/** 
     
    4351                                       $private = null, $lib = null) 
    4452    { 
    45         global $_Auth_OpenID_DEFAULT_MOD, $_Auth_OpenID_DEFAULT_GEN; 
    46  
    4753        if ($lib === null) { 
    4854            $this->lib =& Auth_OpenID_getMathLib(); 
     
    5258 
    5359        if ($mod === null) { 
    54             $this->mod = $this->lib->init($_Auth_OpenID_DEFAULT_MOD); 
     60            $this->mod = $this->lib->init(Auth_OpenID_getDefaultMod()); 
    5561        } else { 
    5662            $this->mod = $mod; 
     
    5864 
    5965        if ($gen === null) { 
    60             $this->gen = $this->lib->init($_Auth_OpenID_DEFAULT_GEN); 
     66            $this->gen = $this->lib->init(Auth_OpenID_getDefaultGen()); 
    6167        } else { 
    6268            $this->gen = $gen; 
     
    9096    function getAssocArgs() 
    9197    { 
    92         global $_Auth_OpenID_DEFAULT_MOD, $_Auth_OpenID_DEFAULT_GEN; 
    93  
    9498        $cpub = $this->lib->longToBase64($this->getPublicKey()); 
    9599        $args = array( 
     
    98102                      ); 
    99103 
    100         if ($this->lib->cmp($this->mod, $_Auth_OpenID_DEFAULT_MOD) || 
    101             $this->lib->cmp($this->gen, $_Auth_OpenID_DEFAULT_GEN)) { 
     104        if ($this->lib->cmp($this->mod, Auth_OpenID_getDefaultMod()) || 
     105            $this->lib->cmp($this->gen, Auth_OpenID_getDefaultGen())) { 
    102106            $args['openid.dh_modulus'] = $this->lib->longToBase64($this->mod); 
    103107            $args['openid.dh_gen'] = $this->lib->longToBase64($this->gen); 
     
    109113    function usingDefaultValues() 
    110114    { 
    111         global $_Auth_OpenID_DEFAULT_GEN, $_Auth_OpenID_DEFAULT_MOD; 
    112  
    113         return ($this->mod == $_Auth_OpenID_DEFAULT_MOD && 
    114                 $this->gen == $_Auth_OpenID_DEFAULT_GEN); 
     115        return ($this->mod == Auth_OpenID_getDefaultMod() && 
     116                $this->gen == Auth_OpenID_getDefaultGen()); 
    115117    } 
    116118 
  • trunk/plugins/CL_OpenID/Auth/OpenID/URINorm.php

    r3229 r3386  
    1313 
    1414// from appendix B of rfc 3986 (http://www.ietf.org/rfc/rfc3986.txt) 
    15 $__uri_pattern = '&^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?&'; 
    16 $__authority_pattern = '/^([^@]*@)?([^:]*)(:.*)?/'; 
    17 $__pct_encoded_pattern = '/%([0-9A-Fa-f]{2})/'; 
    18  
    19 $_unreserved = array(); 
    20 for ($i = 0; $i < 256; $i++) { 
    21     $_unreserved[$i] = false; 
    22 } 
    23  
    24 for ($i = ord('A'); $i <= ord('Z'); $i++) { 
    25     $_unreserved[$i] = true; 
    26 } 
    27  
    28 for ($i = ord('0'); $i <= ord('9'); $i++) { 
    29     $_unreserved[$i] = true; 
    30 } 
    31  
    32 for ($i = ord('a'); $i <= ord('z'); $i++) { 
    33     $_unreserved[$i] = true; 
    34 } 
    35  
    36 $_unreserved[ord('-')] = true; 
    37 $_unreserved[ord('.')] = true; 
    38 $_unreserved[ord('_')] = true; 
    39 $_unreserved[ord('~')] = true; 
    40  
    41 $parts = array(); 
    42 foreach (array_merge($__UCSCHAR, $__IPRIVATE) as $pair) { 
    43     list($m, $n) = $pair; 
    44     $parts[] = sprintf("%s-%s", chr($m), chr($n)); 
    45 } 
    46  
    47 $_escapeme_re = sprintf('[%s]', implode('', $parts)); 
    48  
    49 function _pct_encoded_replace_unreserved($mo) 
    50 { 
    51     global $_unreserved; 
     15function Auth_OpenID_getURIPattern() 
     16{ 
     17    return '&^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?&'; 
     18} 
     19 
     20function Auth_OpenID_getAuthorityPattern() 
     21{ 
     22    return '/^([^@]*@)?([^:]*)(:.*)?/'; 
     23} 
     24 
     25function Auth_OpenID_getEncodedPattern() 
     26{ 
     27    return '/%([0-9A-Fa-f]{2})/'; 
     28} 
     29 
     30function Auth_OpenID_getUnreserved() 
     31{ 
     32    $_unreserved = array(); 
     33    for ($i = 0; $i < 256; $i++) { 
     34        $_unreserved[$i] = false; 
     35    } 
     36 
     37    for ($i = ord('A'); $i <= ord('Z'); $i++) { 
     38        $_unreserved[$i] = true; 
     39    } 
     40 
     41    for ($i = ord('0'); $i <= ord('9'); $i++) { 
     42        $_unreserved[$i] = true; 
     43    } 
     44 
     45    for ($i = ord('a'); $i <= ord('z'); $i++) { 
     46        $_unreserved[$i] = true; 
     47    } 
     48 
     49    $_unreserved[ord('-')] = true; 
     50    $_unreserved[ord('.')] = true; 
     51    $_unreserved[ord('_')] = true; 
     52    $_unreserved[ord('~')] = true; 
     53 
     54    return $_unreserved; 
     55} 
     56 
     57function Auth_OpenID_getEscapeRE() 
     58{ 
     59    $parts = array(); 
     60    foreach (array_merge(Services_Yadis_getUCSChars(), 
     61                         Services_Yadis_getIPrivateChars()) as $pair) { 
     62        list($m, $n) = $pair; 
     63        $parts[] = sprintf("%s-%s", chr($m), chr($n)); 
     64    } 
     65 
     66    return sprintf('[%s]', implode('', $parts)); 
     67} 
     68 
     69function Auth_OpenID_pct_encoded_replace_unreserved($mo) 
     70{ 
     71    $_unreserved = Auth_OpenID_getUnreserved(); 
    5272 
    5373    $i = intval($mo[1], 16); 
     
    6181} 
    6282 
    63 function _pct_encoded_replace($mo) 
     83function Auth_OpenID_pct_encoded_replace($mo) 
    6484{ 
    6585    return chr(intval($mo[1], 16)); 
    6686} 
    6787 
    68 function remove_dot_segments($path) 
     88function Auth_OpenID_remove_dot_segments($path) 
    6989{ 
    7090    $result_segments = array(); 
    7191     
    7292    while ($path) { 
    73         if (_startswith($path, '../')) { 
     93        if (Services_Yadis_startswith($path, '../')) { 
    7494            $path = substr($path, 3); 
    75         } else if (_startswith($path, './')) { 
     95        } else if (Services_Yadis_startswith($path, './')) { 
    7696            $path = substr($path, 2); 
    77         } else if (_startswith($path, '/./')) { 
     97        } else if (Services_Yadis_startswith($path, '/./')) { 
    7898            $path = substr($path, 2); 
    7999        } else if ($path == '/.') { 
    80100            $path = '/'; 
    81         } else if (_startswith($path, '/../')) { 
     101        } else if (Services_Yadis_startswith($path, '/../')) { 
    82102            $path = substr($path, 3); 
    83103            if ($result_segments) { 
     
    111131function Auth_OpenID_urinorm($uri) 
    112132{ 
    113     global $__uri_pattern, $__authority_pattern, $__pct_encoded_pattern; 
    114  
    115133    $uri_matches = array(); 
    116     preg_match($__uri_pattern, $uri, $uri_matches); 
     134    preg_match(Auth_OpenID_getURIPattern(), $uri, $uri_matches); 
    117135 
    118136    if (count($uri_matches) < 9) { 
     
    146164 
    147165    $authority_matches = array(); 
    148     preg_match($__authority_pattern, $authority, $authority_matches); 
     166    preg_match(Auth_OpenID_getAuthorityPattern(), 
     167               $authority, $authority_matches); 
    149168    if (count($authority_matches) === 0) { 
    150169        // URI does not have a valid authority 
     
    167186        $host = strtolower($host); 
    168187        $host = preg_replace_callback( 
    169                   $__pct_encoded_pattern, '_pct_encoded_replace', $host); 
     188                  Auth_OpenID_getEncodedPattern(), 
     189                  'Auth_OpenID_pct_encoded_replace', $host); 
    170190        // NO IDNA. 
    171191        // $host = unicode($host, 'utf-8').encode('idna'); 
     
    188208    $path = $uri_matches[5]; 
    189209    $path = preg_replace_callback( 
    190                $__pct_encoded_pattern, 
    191                '_pct_encoded_replace_unreserved', $path); 
    192  
    193     $path = remove_dot_segments($path); 
     210               Auth_OpenID_getEncodedPattern(), 
     211               'Auth_OpenID_pct_encoded_replace_unreserved', $path); 
     212 
     213    $path = Auth_OpenID_remove_dot_segments($path); 
    194214    if (!$path) { 
    195215        $path = '/'; 
  • trunk/plugins/CL_OpenID/Services/Yadis/Misc.php

    r3229 r3386  
    1010 */ 
    1111 
    12 $__UCSCHAR = array( 
    13                    array(0xA0, 0xD7FF), 
    14                    array(0xF900, 0xFDCF), 
    15                    array(0xFDF0, 0xFFEF), 
    16                    array(0x10000, 0x1FFFD), 
    17                    array(0x20000, 0x2FFFD), 
    18                    array(0x30000, 0x3FFFD), 
    19                    array(0x40000, 0x4FFFD), 
    20                    array(0x50000, 0x5FFFD), 
    21                    array(0x60000, 0x6FFFD), 
    22                    array(0x70000, 0x7FFFD), 
    23                    array(0x80000, 0x8FFFD), 
    24                    array(0x90000, 0x9FFFD), 
    25                    array(0xA0000, 0xAFFFD), 
    26                    array(0xB0000, 0xBFFFD), 
    27                    array(0xC0000, 0xCFFFD), 
    28                    array(0xD0000, 0xDFFFD), 
    29                    array(0xE1000, 0xEFFFD) 
    30                    ); 
     12function Services_Yadis_getUCSChars() 
     13{ 
     14    return array( 
     15                 array(0xA0, 0xD7FF), 
     16                 array(0xF900, 0xFDCF), 
     17                 array(0xFDF0, 0xFFEF), 
     18                 array(0x10000, 0x1FFFD), 
     19                 array(0x20000, 0x2FFFD), 
     20                 array(0x30000, 0x3FFFD), 
     21                 array(0x40000, 0x4FFFD), 
     22                 array(0x50000, 0x5FFFD), 
     23                 array(0x60000, 0x6FFFD), 
     24                 array(0x70000, 0x7FFFD), 
     25                 array(0x80000, 0x8FFFD), 
     26                 array(0x90000, 0x9FFFD), 
     27                 array(0xA0000, 0xAFFFD), 
     28                 array(0xB0000, 0xBFFFD), 
     29                 array(0xC0000, 0xCFFFD), 
     30                 array(0xD0000, 0xDFFFD), 
     31                 array(0xE1000, 0xEFFFD) 
     32                 ); 
     33} 
    3134 
    32 $__IPRIVATE = array( 
    33                     array(0xE000, 0xF8FF), 
    34                     array(0xF0000, 0xFFFFD), 
    35                     array(0x100000, 0x10FFFD) 
    36                     ); 
     35function Services_Yadis_getIPrivateChars() 
     36{ 
     37    return array( 
     38                 array(0xE000, 0xF8FF), 
     39                 array(0xF0000, 0xFFFFD), 
     40                 array(0x100000, 0x10FFFD) 
     41                 ); 
     42} 
    3743 
    38 function _pct_escape_unicode($char_match) 
     44function Services_Yadis_pct_escape_unicode($char_match) 
    3945{ 
    4046    $c = $char_match[0]; 
     
    4652} 
    4753 
    48 function _startswith($s, $stuff) 
     54function Services_Yadis_startswith($s, $stuff) 
    4955{ 
    5056    return strpos($s, $stuff) === 0; 
  • trunk/plugins/CL_OpenID/Services/Yadis/ParseHTML.php

    r3229 r3386  
    3131     * @access private 
    3232     */ 
    33     var $_tag_expr = "<%s\b(?!:)([^>]*?)(?:\/>|>(.*?)(?:<\/?%s\s*>|\Z))"; 
    34  
    35     /** 
    36      * @access private 
    37      */ 
    38     var $_close_tag_expr = "<\/?%s\s*>"; 
    39  
    40     /** 
    41      * @access private 
    42      */ 
    43     var $_removed_re = 
    44            "<!--.*?-->|<!\[CDATA\[.*?\]\]>|<script\b(?!:)[^>]*>.*?<\/script>"; 
    45  
    46     /** 
    47      * @access private 
    48      */ 
    49     var $_attr_find = '\b([-\w]+)=("[^"]*"|\'[^\']*\'|[^\'"\s\/<>]+)'; 
     33    var $_tag_expr = "<%s%s(?:\s.*?)?%s>"; 
     34 
     35    /** 
     36     * @access private 
     37     */ 
     38    var $_attr_find = '\b([-\w]+)=(".*?"|\'.*?\'|.+?)[\s>]'; 
    5039 
    5140    function Services_Yadis_ParseHTML() 
    5241    { 
    53         $this->_meta_find = sprintf("/<meta\b(?!:)([^>]*)(?!<)>/%s", 
    54                                     $this->_re_flags); 
    55  
    56         $this->_removed_re = sprintf("/%s/%s", 
    57                                      $this->_removed_re, 
    58                                      $this->_re_flags); 
    59  
    6042        $this->_attr_find = sprintf("/%s/%s", 
    6143                                    $this->_attr_find, 
     
    122104 
    123105    /** 
    124      * Create a regular expression that will match an opening (and 
    125      * optional) closing tag of a given name. 
    126      * 
    127      * @access private 
    128      * @param string $tag_name The tag name to match 
    129      * @param array $close_tags An array of tag names which also 
    130      * constitute closing of the original tag 
     106     * Create a regular expression that will match an opening  
     107     * or closing tag from a set of names. 
     108     * 
     109     * @access private 
     110     * @param mixed $tag_names Tag names to match 
     111     * @param mixed $close false/0 = no, true/1 = yes, other = maybe 
     112     * @param mixed $self_close false/0 = no, true/1 = yes, other = maybe 
    131113     * @return string $regex A regular expression string to be used 
    132114     * in, say, preg_match. 
    133115     */ 
    134     function tagMatcher($tag_name, $close_tags = null) 
    135     { 
    136         if ($close_tags) { 
    137             $options = implode("|", array_merge(array($tag_name), $close_tags)); 
    138             $closer = sprintf("(?:%s)", $options); 
     116    function tagPattern($tag_names, $close, $self_close) 
     117    { 
     118        if (is_array($tag_names)) { 
     119            $tag_names = '(?:'.implode('|',$tag_names).')'; 
     120        } 
     121        if ($close) { 
     122            $close = '\/' . (($close == 1)? '' : '?'); 
    139123        } else { 
    140             $closer = $tag_name; 
    141         } 
    142  
    143         $expr = sprintf($this->_tag_expr, $tag_name, $closer); 
     124            $close = ''; 
     125        } 
     126        if ($self_close) { 
     127            $self_close = '(?:\/\s*)' . (($self_close == 1)? '' : '?'); 
     128        } else { 
     129            $self_close = ''; 
     130        } 
     131        $expr = sprintf($this->_tag_expr, $close, $tag_names, $self_close); 
     132 
    144133        return sprintf("/%s/%s", $expr, $this->_re_flags); 
    145     } 
    146  
    147     /** 
    148      * @access private 
    149      */ 
    150     function htmlFind($str) 
    151     { 
    152         return $this->tagMatcher('html', array('body')); 
    153     } 
    154  
    155     /** 
    156      * @access private 
    157      */ 
    158     function headFind() 
    159     { 
    160         return $this->tagMatcher('head', array('body')); 
    161134    } 
    162135 
     
    174147    function getMetaTags($html_string) 
    175148    { 
    176         $stripped = preg_replace($this->_removed_re, 
    177                                  "", 
    178                                  $html_string); 
    179  
    180         // Look for the closing body tag. 
    181         $body_closer = sprintf($this->_close_tag_expr, 'body'); 
    182         $body_matches = array(); 
    183         preg_match($body_closer, $html_string, $body_matches, 
    184                    PREG_OFFSET_CAPTURE); 
    185         if ($body_matches) { 
    186             $html_string = substr($html_string, 0, $body_matches[0][1]); 
    187         } 
    188  
    189         // Look for the opening body tag, and discard everything after 
    190         // that tag. 
    191         $body_re = $this->tagMatcher('body'); 
    192         $body_matches = array(); 
    193         preg_match($body_re, $html_string, $body_matches, PREG_OFFSET_CAPTURE); 
    194         if ($body_matches) { 
    195             $html_string = substr($html_string, 0, $body_matches[0][1]); 
    196         } 
    197  
    198         // If an HTML tag is found at all, it must be in the right 
    199         // order; else, it may be missing (which is a case we allow 
    200         // for). 
    201         $html_re = $this->tagMatcher('html', array('body')); 
    202         preg_match($html_re, $html_string, $html_matches); 
    203         if ($html_matches) { 
    204             $html = $html_matches[0]; 
    205         } else { 
    206             $html = $html_string; 
    207         } 
    208  
    209         // Try to find the <HEAD> tag. 
    210         $head_re = $this->headFind(); 
    211         $head_matches = array(); 
    212         if (!preg_match($head_re, $html, $head_matches)) { 
    213             return array(); 
    214         } 
     149        $key_tags = array($this->tagPattern('html', false, false), 
     150                          $this->tagPattern('head', false, false), 
     151                          $this->tagPattern('head', true, false), 
     152                          $this->tagPattern('html', true, false), 
     153                          $this->tagPattern(array( 
     154                          'body', 'frameset', 'frame', 'p', 'div', 
     155                          'table','span','a'), 'maybe', 'maybe')); 
     156        $key_tags_pos = array(); 
     157        foreach ($key_tags as $pat) { 
     158            $matches = array(); 
     159            preg_match($pat, $html_string, $matches, PREG_OFFSET_CAPTURE); 
     160            if($matches) { 
     161                $key_tags_pos[] = $matches[0][1]; 
     162            } else { 
     163                $key_tags_pos[] = null; 
     164            } 
     165        } 
     166        // no opening head tag 
     167        if (is_null($key_tags_pos[1])) { 
     168            return array(); 
     169        } 
     170        // the effective </head> is the min of the following 
     171        if (is_null($key_tags_pos[2])) { 
     172            $key_tags_pos[2] = strlen($html_string); 
     173        } 
     174        foreach (array($key_tags_pos[3], $key_tags_pos[4]) as $pos) { 
     175            if (!is_null($pos) && $pos < $key_tags_pos[2]) { 
     176                $key_tags_pos[2] = $pos; 
     177            } 
     178        } 
     179        // closing head tag comes before opening head tag 
     180        if ($key_tags_pos[1] > $key_tags_pos[2]) { 
     181            return array(); 
     182        } 
     183        // if there is an opening html tag, make sure the opening head tag 
     184        // comes after it 
     185        if (!is_null($key_tags_pos[0]) && $key_tags_pos[1] < $key_tags_pos[0]) { 
     186            return array(); 
     187        } 
     188        $html_string = substr($html_string, $key_tags_pos[1], ($key_tags_pos[2]-$key_tags_pos[1])); 
    215189 
    216190        $link_data = array(); 
    217191        $link_matches = array(); 
    218  
    219         if (!preg_match_all($this->_meta_find, $head_matches[0], 
    220                             $link_matches)) { 
     192         
     193        if (!preg_match_all($this->tagPattern('meta', false, 'maybe'), 
     194                            $html_string, $link_matches)) { 
    221195            return array(); 
    222196        } 
  • trunk/plugins/CL_OpenID/Services/Yadis/PlainHTTPFetcher.php

    r3229 r3386  
    148148        $headers = array(); 
    149149 
    150         $headers[] = "POST ".$parts['path']." HTTP/1.0"; 
     150        $post_path = $parts['path']; 
     151        if (isset($parts['query'])) { 
     152            $post_path .= '?' . $parts['query']; 
     153        } 
     154 
     155        $headers[] = "POST ".$post_path." HTTP/1.0"; 
    151156        $headers[] = "Host: " . $parts['host']; 
    152157        $headers[] = "Content-type: application/x-www-form-urlencoded"; 
  • trunk/plugins/CL_OpenID/Services/Yadis/XML.php

    r3247 r3386  
    11<?php 
    2 global $__Services_Yadis_defaultParser;