{
http_message_object *o = (http_message_object *) object;
+ if (o->iterator) {
+ zval_ptr_dtor(&o->iterator);
+ o->iterator = NULL;
+ }
if (o->message) {
http_message_dtor(o->message);
efree(o->message);
}
convert_to_double(zv);
- sprintf(v, "%1.1lf", Z_DVAL_P(zv));
+ snprintf(v, sizeof(v), "%1.1f", Z_DVAL_P(zv));
if (strcmp(v, "1.0") && strcmp(v, "1.1")) {
- http_error_ex(HE_WARNING, HTTP_E_INVALID_PARAM, "Invalid HTTP protocol version (1.0 or 1.1): %s", v);
+ http_error_ex(HE_WARNING, HTTP_E_INVALID_PARAM, "Invalid HTTP protocol version (1.0 or 1.1): %g", Z_DVAL_P(zv));
RETURN_FALSE;
}
if ((msg = http_message_parse_ex(obj->message, serialized, (size_t) length))) {
obj->message = msg;
} else {
- http_error(HE_ERROR, HTTP_E_RUNTIME, "Could not unserialize HttpMessage");
http_message_init(obj->message);
+ http_error(HE_ERROR, HTTP_E_RUNTIME, "Could not unserialize HttpMessage");
}
}
}