DCL_CONST(long, "LEVEL_DEF", HTTP_DEFLATE_LEVEL_DEF);
DCL_CONST(long, "LEVEL_MIN", HTTP_DEFLATE_LEVEL_MIN);
DCL_CONST(long, "LEVEL_MAX", HTTP_DEFLATE_LEVEL_MAX);
+ DCL_CONST(long, "STRATEGY_DEF", HTTP_DEFLATE_STRATEGY_DEF);
+ DCL_CONST(long, "STRATEGY_FILT", HTTP_DEFLATE_STRATEGY_FILT);
+ DCL_CONST(long, "STRATEGY_HUFF", HTTP_DEFLATE_STRATEGY_HUFF);
+ DCL_CONST(long, "STRATEGY_RLE", HTTP_DEFLATE_STRATEGY_RLE);
+ DCL_CONST(long, "STRATEGY_FIXED", HTTP_DEFLATE_STRATEGY_FIXED);
#endif
}
}
/* }}} */
-/* {{{ proto string http_build_url(mixed url[, mixed parts[, array new_url]])
+/* {{{ proto string http_build_url(mixed url[, mixed parts[, array &new_url]])
*
* Returns the new URL as string on success or FALSE on failure.
*/
} else {
convert_to_string(z_new_url);
if (!(new_url = php_url_parse_ex(Z_STRVAL_P(z_new_url), Z_STRLEN_P(z_new_url)))) {
+ http_error_ex(HE_WARNING, HTTP_E_URL, "Could not parse URL (%s)", Z_STRVAL_P(z_new_url));
RETURN_FALSE;
}
}
if (new_url) {
php_url_free(new_url);
}
+ http_error_ex(HE_WARNING, HTTP_E_URL, "Could not parse URL (%s)", Z_STRVAL_P(z_old_url));
RETURN_FALSE;
}
}
* Provides a basic throttling mechanism, which will yield the current process
* resp. thread until the entity has been completely sent, though.
*
- * Note: This doesn't really work with the FastCGI SAPI.
- *
* Expects a double parameter specifying the seconds too sleep() after
* each chunk sent. Additionally accepts an optional int parameter
* representing the chunk size in bytes.
if (purl) {
http_build_url(purl, NULL, NULL, &abs, NULL);
php_url_free(purl);
+ } else {
+ http_error_ex(HE_WARNING, HTTP_E_URL, "Could not parse URL (%s)", url);
}
return abs;