#include "php_http_send_api.h"
#ifdef ZEND_ENGINE_2
+# include "zend_exceptions.h"
# include "php_http_exception_object.h"
#endif
PHP_FUNCTION(http_request_method_unregister)
{
zval *method;
- zend_bool numeric;
- unsigned long existing;
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/", &method)) {
RETURN_FALSE;
// response
if (!strncmp(http_line, "HTTP/1.", lenof("HTTP/1."))) {
new->type = HTTP_MSG_RESPONSE;
- new->info.response.http_version = atof(http_line + lenof("HTTP/"));
+ new->info.response.http_version = (float) atof(http_line + lenof("HTTP/"));
new->info.response.code = atoi(http_line + lenof("HTTP/1.1 "));
} else
// request
if (!strncmp(http_line + line_length - lenof("HTTP/1.1"), "HTTP/1.", lenof("HTTP/1."))) {
const char *method_sep_uri = strchr(http_line, ' ');
new->type = HTTP_MSG_REQUEST;
- new->info.request.http_version = atof(http_line + line_length - lenof("1.1"));
+ new->info.request.http_version = (float) atof(http_line + line_length - lenof("1.1"));
new->info.request.method = estrndup(http_line, method_sep_uri - http_line);
new->info.request.URI = estrndup(method_sep_uri + 1, http_line + line_length - method_sep_uri - 1 - lenof(" HTTP/1.1"));
}
#ifdef ZEND_ENGINE_2
+#include "missing.h"
+
ZEND_EXTERN_MODULE_GLOBALS(http)
/* {{{ HttpResponse */
char *string = NULL;
int length = 0;
http_message *msg = NULL;
- http_message_object obj;
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &string, &length)) {
RETURN_NULL();
NO_ARGS;
IF_RETVAL_USED {
- zval *uri;
getObject(http_message_object, obj);
if (!HTTP_MSG_TYPE(REQUEST, obj->message)) {
PHP_METHOD(HttpMessage, setHttpVersion)
{
char v[4];
- zval *zv, *version;
+ zval *zv;
getObject(http_message_object, obj);
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/", &zv)) {
#ifdef ZEND_ENGINE_2
+#include "missing.h"
+
#define http_response_object_declare_default_properties() _http_response_object_declare_default_properties(TSRMLS_C)
static inline void _http_response_object_declare_default_properties(TSRMLS_D);