cvs: pecl /http http_request_api.c

From: Date: Thu, 19 Jan 2006 10:34:04 +0000
Subject: cvs: pecl /http http_request_api.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-4987@lists.php.net to get a copy of this message
mike Thu Jan 19 10:34:04 2006 UTC Modified files: /pecl/http http_request_api.c Log: move (re)setting of request methods to http_request_defaults() http://cvs.php.net/viewcvs.cgi/pecl/http/http_request_api.c?r1=1.108&r2=1.109&diff_format=u Index: pecl/http/http_request_api.c diff -u pecl/http/http_request_api.c:1.108 pecl/http/http_request_api.c:1.109 --- pecl/http/http_request_api.c:1.108 Fri Jan 13 14:30:46 2006 +++ pecl/http/http_request_api.c Thu Jan 19 10:34:04 2006 @@ -10,7 +10,7 @@ +--------------------------------------------------------------------+ */ -/* $Id: http_request_api.c,v 1.108 2006/01/13 14:30:46 mike Exp $ */ +/* $Id: http_request_api.c,v 1.109 2006/01/19 10:34:04 mike Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -392,6 +392,10 @@ HTTP_CURL_OPT(INFILESIZE, 0); HTTP_CURL_OPT(HTTP_VERSION, CURL_HTTP_VERSION_NONE); HTTP_CURL_OPT(CUSTOMREQUEST, NULL); + HTTP_CURL_OPT(NOBODY, 0); + HTTP_CURL_OPT(POST, 0); + HTTP_CURL_OPT(UPLOAD, 0); + HTTP_CURL_OPT(HTTPGET, 1); } } /* }}} */ @@ -643,42 +647,22 @@ switch (request->meth) { case HTTP_GET: - HTTP_CURL_OPT(CUSTOMREQUEST, NULL); - HTTP_CURL_OPT(NOBODY, 0); - HTTP_CURL_OPT(POST, 0); - HTTP_CURL_OPT(UPLOAD, 0); HTTP_CURL_OPT(HTTPGET, 1); break; case HTTP_HEAD: - HTTP_CURL_OPT(CUSTOMREQUEST, NULL); - HTTP_CURL_OPT(POST, 0); - HTTP_CURL_OPT(UPLOAD, 0); - HTTP_CURL_OPT(HTTPGET, 0); HTTP_CURL_OPT(NOBODY, 1); break; case HTTP_POST: - HTTP_CURL_OPT(CUSTOMREQUEST, NULL); - HTTP_CURL_OPT(UPLOAD, 0); - HTTP_CURL_OPT(HTTPGET, 0); - HTTP_CURL_OPT(NOBODY, 0); HTTP_CURL_OPT(POST, 1); break; case HTTP_PUT: - HTTP_CURL_OPT(CUSTOMREQUEST, NULL); - HTTP_CURL_OPT(HTTPGET, 0); - HTTP_CURL_OPT(NOBODY, 0); - HTTP_CURL_OPT(POST, 0); HTTP_CURL_OPT(UPLOAD, 1); break; default: - HTTP_CURL_OPT(HTTPGET, 0); - HTTP_CURL_OPT(NOBODY, 0); - HTTP_CURL_OPT(POST, 0); - HTTP_CURL_OPT(UPLOAD, 0); if (http_request_method_exists(0, request->meth, NULL)) { HTTP_CURL_OPT(CUSTOMREQUEST, http_request_method_name(request->meth)); } else {

« previous php.pecl.cvs (#4987) next »