X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_request_api.c;h=534542fd4a31d59f7d3cc33349d5d87468cea6da;hp=63a3927994dbdd69d362c5af0ea50564d61a3794;hb=a84e2e5f8fa39386883754b6ab8bcd7fbfb5ed94;hpb=0461b43f4f06cd93b76855b6c3ead76c04e79f1d diff --git a/http_request_api.c b/http_request_api.c index 63a3927..534542f 100644 --- a/http_request_api.c +++ b/http_request_api.c @@ -514,7 +514,7 @@ PHP_HTTP_API STATUS _http_request_ex(CURL *ch, http_request_method meth, const c break; default: - http_error_ex(E_WARNING, HTTP_E_CURL, "Unkown request body type: %d", body->type); + http_error_ex(E_WARNING, HTTP_E_CURL, "Unknown request body type: %d", body->type); status = FAILURE; goto http_request_end; break; @@ -667,21 +667,21 @@ PHP_HTTP_API STATUS _http_request_method_unregister(unsigned long method TSRMLS_ { zval **zmethod; char *http_method; - + if (SUCCESS != zend_hash_index_find(&HTTP_G(request).methods.custom, HTTP_CUSTOM_REQUEST_METHOD(method), (void **) &zmethod)) { http_error_ex(E_NOTICE, HTTP_E_PARAM, "Request method with id %lu does not exist", method); return FAILURE; } spprintf(&http_method, 0, "HTTP_%s", Z_STRVAL_PP(zmethod)); - + if ( (SUCCESS != zend_hash_index_del(&HTTP_G(request).methods.custom, HTTP_CUSTOM_REQUEST_METHOD(method))) || (SUCCESS != zend_hash_del(EG(zend_constants), http_method, strlen(http_method) + 1))) { http_error_ex(E_NOTICE, 0, "Could not unregister request method: %s", http_method); efree(http_method); return FAILURE; } - + efree(http_method); return SUCCESS; }