- adjust ini entry names to those of the globals struct
[m6w6/ext-http] / http_functions.c
index 0dfb68bcf9747e9554d7392a21a8814f0d839087..e894b19ebe4ec892a94e3fb7fab5f0c1533c5b5b 100644 (file)
@@ -1089,7 +1089,7 @@ PHP_FUNCTION(http_parse_cookie)
        }
 }
 
-/* {{{ proto object http_parse_params(string param)
+/* {{{ proto object http_parse_params(string param[, int flags = HTTP_PARAMS_DEFAULT])
  *
  * Parse parameter list.
  */
@@ -1098,14 +1098,15 @@ PHP_FUNCTION(http_parse_params)
        char *param;
        int param_len;
        zval *params;
+       long flags = HTTP_PARAMS_DEFAULT;
        
-       if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &param, &param_len)) {
+       if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &param, &param_len, &flags)) {
                RETURN_FALSE;
        }
        
        params = ecalloc(1, sizeof(zval));
        array_init(params);
-       if (SUCCESS != http_parse_params(param, Z_ARRVAL_P(params))) {
+       if (SUCCESS != http_parse_params(param, flags, Z_ARRVAL_P(params))) {
                zval_dtor(params);
                FREE_ZVAL(params);
                RETURN_FALSE;
@@ -1248,9 +1249,8 @@ PHP_FUNCTION(http_match_request_header)
  *  - cookies:          array, list of cookies as associative array
  *                      like array("cookie" => "value")
  *  - encodecookies:    bool, whether to urlencode the cookies (default: true)
- *  - resetcookies:     bool, wheter to reset the cookies
  *  - cookiestore:      string, path to a file where cookies are/will be stored
- *  - cookiesession:    bool, accept (true) or reset (false) sessioncookies
+ *  - cookiesession:    bool, don't load session cookies from cookiestore if TRUE
  *  - resume:           int, byte offset to start the download from;
  *                      if the server supports ranges
  *  - range:            array, array of arrays, each containing two integers,