*/
PHP_FUNCTION(http_request_method_exists)
{
- IF_RETVAL_USED {
+ if (return_value_used) {
zval *method;
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/", &method)) {
*/
PHP_FUNCTION(http_request_method_name)
{
- IF_RETVAL_USED {
+ if (return_value_used) {
long method;
if ((SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &method)) || (method < 0)) {
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
getObject(http_message_object, obj);
RETURN_PHPSTR(&obj->message->body, PHPSTR_FREE_NOT, 1);
}
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
zval headers;
getObject(http_message_object, obj);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
getObject(http_message_object, obj);
RETURN_LONG(obj->message->type);
}
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
getObject(http_message_object, obj);
HTTP_CHECK_MESSAGE_TYPE_RESPONSE(obj->message, RETURN_FALSE);
RETURN_LONG(obj->message->http.info.response.code);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
getObject(http_message_object, obj);
HTTP_CHECK_MESSAGE_TYPE_RESPONSE(obj->message, RETURN_FALSE);
RETURN_STRING(obj->message->http.info.response.status, 1);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
getObject(http_message_object, obj);
HTTP_CHECK_MESSAGE_TYPE_REQUEST(obj->message, RETURN_FALSE);
RETURN_STRING(obj->message->http.info.request.method, 1);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
getObject(http_message_object, obj);
HTTP_CHECK_MESSAGE_TYPE_REQUEST(obj->message, RETURN_FALSE);
RETURN_STRING(obj->message->http.info.request.url, 1);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
char ver[4] = {0};
getObject(http_message_object, obj);
*/
PHP_METHOD(HttpMessage, toString)
{
- IF_RETVAL_USED {
+ if (return_value_used) {
char *string;
size_t length;
zend_bool include_parent = 0;
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
getObject(http_message_object, obj);
switch (obj->message->type)
}
}
- IF_RETVAL_USED {
+ if (return_value_used) {
RETURN_PROP(queryString);
}
}
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
zval *opts, **options;
opts = GET_PROP(options);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
RETURN_PROP(options);
}
}
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
RETURN_PROP(url);
}
}
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
RETURN_PROP(method);
}
}
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
RETURN_PROP(contentType);
}
}
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
RETURN_PROP(queryData);
}
}
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
RETURN_PROP(postFields);
}
}
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
RETURN_PROP(rawPostData);
}
}
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
RETURN_PROP(postFiles);
}
}
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
RETURN_PROP(putFile);
}
}
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
RETURN_PROP(putData);
}
}
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
RETURN_PROP(responseData);
}
}
*/
PHP_METHOD(HttpRequest, getResponseHeader)
{
- IF_RETVAL_USED {
+ if (return_value_used) {
zval *data, **headers, **header;
char *header_name = NULL;
int header_len = 0;
*/
PHP_METHOD(HttpRequest, getResponseCookies)
{
- IF_RETVAL_USED {
+ if (return_value_used) {
long flags = 0;
zval *allowed_extras_array = NULL, *data, **headers;
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
zval **body;
zval *data = GET_PROP(responseData);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
RETURN_PROP(responseCode);
}
}
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
RETURN_PROP(responseStatus);
}
}
*/
PHP_METHOD(HttpRequest, getResponseInfo)
{
- IF_RETVAL_USED {
+ if (return_value_used) {
zval *info, **infop;
char *info_name = NULL;
int info_len = 0;
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
http_message *msg;
getObject(http_request_object, obj);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
getObject(http_request_object, obj);
RETURN_PHPSTR_DUP(&obj->request->conv.request);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
getObject(http_request_object, obj);
RETURN_PHPSTR_DUP(&obj->request->conv.response);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
zval *hist;
SET_EH_THROW_HTTP();
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
getObject(http_requestpool_object, obj);
RETURN_BOOL(obj->iterator.pos >= 0 && obj->iterator.pos < zend_llist_count(&obj->pool.handles));
}
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
long pos = 0;
zval **current = NULL;
zend_llist_position lpos;
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
getObject(http_requestpool_object, obj);
RETURN_LONG(obj->iterator.pos);
}
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
zval *cache_p, *cache = convert_to_type_ex(IS_BOOL, GET_STATIC_PROP(cache), &cache_p);
RETVAL_ZVAL(cache, 1, 0);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
zval *gzip_p, *gzip = convert_to_type_ex(IS_BOOL, GET_STATIC_PROP(gzip), &gzip_p);
RETVAL_ZVAL(gzip, 1, 0);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
zval *ccontrol_p, *ccontrol = convert_to_type_ex(IS_STRING, GET_STATIC_PROP(cacheControl), &ccontrol_p);
RETVAL_ZVAL(ccontrol, 1, 0);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
zval *ctype_p, *ctype = convert_to_type_ex(IS_STRING, GET_STATIC_PROP(contentType), &ctype_p);
RETVAL_ZVAL(ctype, 1, 0);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
zval *cd_p, *cd = convert_to_type_ex(IS_STRING, GET_STATIC_PROP(contentDisposition), &cd_p);
RETVAL_ZVAL(cd, 1, 0);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
zval *etag_p, *etag = convert_to_type_ex(IS_STRING, GET_STATIC_PROP(eTag), &etag_p);
RETVAL_ZVAL(etag, 1, 0);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
zval *lm_p, *lm = convert_to_type_ex(IS_LONG, GET_STATIC_PROP(lastModified), &lm_p);
RETVAL_ZVAL(lm, 1, 0);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
zval *delay_p, *delay = convert_to_type_ex(IS_DOUBLE, GET_STATIC_PROP(throttleDelay), &delay_p);
RETVAL_ZVAL(delay, 1, 0);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
zval *size_p, *size = convert_to_type_ex(IS_LONG, GET_STATIC_PROP(bufferSize), &size_p);
RETVAL_ZVAL(size, 1, 0);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
zval *the_data = GET_STATIC_PROP(data);
RETURN_ZVAL(the_data, 1, 0);
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
zval *stream_p;
RETVAL_RESOURCE(Z_LVAL_P(convert_to_type_ex(IS_LONG, GET_STATIC_PROP(stream), &stream_p)));
{
NO_ARGS;
- IF_RETVAL_USED {
+ if (return_value_used) {
zval *the_file_p, *the_file = convert_to_type_ex(IS_STRING, GET_STATIC_PROP(file), &the_file_p);
RETVAL_ZVAL(the_file, 1, 0);
zend_error(E_NOTICE, "Wrong parameter count for %s()", get_active_function_name(TSRMLS_C)); \
}
-/* check if return value is used */
-#define IF_RETVAL_USED \
- if (!return_value_used) { \
- return; \
- } else
-
/* CR LF */
#define HTTP_CRLF "\r\n"