* much smarter & enhanced absolute_uri() using parse_url()
[m6w6/ext-http] / http_methods.c
index 93d6454230d52ba094fb115b395f62cc95491206..45a5c61812816b6b983f639d74716bdcb66d742d 100644 (file)
@@ -439,7 +439,7 @@ PHP_METHOD(HTTPi_Response, send)
        getObject(httpi_response_object, obj);
 
        NO_ARGS;
-       
+
        do_cache = GET_PROP(obj, cache);
        do_gzip  = GET_PROP(obj, gzip);
 
@@ -668,7 +668,7 @@ PHP_METHOD(HTTPi_Request, getURL)
 
 /* {{{ proto bool HTTPi_Request::setMethod(long request_method)
  *
- * Set the request methods; one of the <tt>HTTP_HEAD</tt>, <tt>HTTP_GET</tt> or 
+ * Set the request methods; one of the <tt>HTTP_HEAD</tt>, <tt>HTTP_GET</tt> or
  * <tt>HTTP_POST</tt> constants.
  */
 PHP_METHOD(HTTPi_Request, setMethod)
@@ -1087,8 +1087,8 @@ PHP_METHOD(HTTPi_Request, send)
        info  = GET_PROP(obj, responseInfo);
        resp  = GET_PROP(obj, responseData);
 
-       // HTTP_URI_MAXLEN+1 big char *
-       request_uri = http_absolute_uri(Z_STRVAL_P(URL), NULL);
+       // HTTP_URI_MAXLEN+1 long char *
+       request_uri = http_absolute_uri_ex(Z_STRVAL_P(URL), Z_STRLEN_P(URL), NULL, 0, NULL, 0, 0);
 
        if (Z_STRLEN_P(qdata) && (strlen(request_uri) < HTTP_URI_MAXLEN)) {
                if (!strchr(request_uri, '?')) {