Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/curl interface.c

2004-08-19 Thread Sterling Hughes
yep, that's right.

On Fri, 20 Aug 2004 11:06:33 +1000, Dave Barr <[EMAIL PROTECTED]> wrote:
> Ilia Alshanetsky wrote:
> 
> > iliaa Thu Aug 19 20:55:56 2004 EDT
> >
> >   Modified files:
> > /php-src/ext/curl interface.c
> >   Log:
> >   Added more missing cURL options.
> >
> > + REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFMODSINCE);
> > + REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFUNMODSINCE);
> > + REGISTER_CURL_CONSTANT(CURL_TIMECOND_LASTMOD);
> 
> Great, thanks!
> 
> > + case CURL_TIMECOND_IFMODSINCE:
> > + case CURL_TIMECOND_IFUNMODSINCE:
> > + case CURL_TIMECOND_LASTMOD:
> >   convert_to_long_ex(zvalue);
> >   error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
> >   break;
> 
> I don't think the three constants belong here. This switch() is for
> CURLOPT_'s which these constants are not. These constants are for use
> with CURLOPT_TIMECONDITION. You would use them as such:
> 
> curl_setopt($ch, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
> curl_setopt($ch, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFUNMODSINCE);
> curl_setopt($ch, CURLOPT_TIMECONDITION, CURL_TIMECOND_LASTMOD);
> 
> Dave
> 
> --
> PHP Internals - PHP Runtime Development Mailing List
> 
> 
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/curl interface.c

2004-08-19 Thread Dave Barr
Ilia Alshanetsky wrote:
iliaa   Thu Aug 19 20:55:56 2004 EDT
  Modified files:  
/php-src/ext/curl	interface.c 
  Log:
  Added more missing cURL options.
  
+	REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFMODSINCE);
+	REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFUNMODSINCE);
+	REGISTER_CURL_CONSTANT(CURL_TIMECOND_LASTMOD);
Great, thanks!
+   case CURL_TIMECOND_IFMODSINCE:
+   case CURL_TIMECOND_IFUNMODSINCE:
+   case CURL_TIMECOND_LASTMOD:
convert_to_long_ex(zvalue);
error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
break;
I don't think the three constants belong here. This switch() is for 
CURLOPT_'s which these constants are not. These constants are for use 
with CURLOPT_TIMECONDITION. You would use them as such:

curl_setopt($ch, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
curl_setopt($ch, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFUNMODSINCE);
curl_setopt($ch, CURLOPT_TIMECONDITION, CURL_TIMECOND_LASTMOD);
Dave
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/curl interface.c

2004-08-19 Thread Dave Barr
Ilia Alshanetsky wrote:
iliaa   Wed Aug 18 17:27:25 2004 EDT
  Modified files:  
/php-src/ext/curl	interface.c 
  Log:
  Fixed bug #29727 (Added missing CURL authentication directives).
[snip]
+
+#if LIBCURL_VERSION_NUM > 0x070a06 /* CURLOPT_PROXYAUTH is available since curl 
7.10.7 */
+   REGISTER_CURL_CONSTANT(CURLOPT_PROXYAUTH);
+#endif
+
Can you also add the constants in the following patch, please?
Dave
Index: interface.c
===
RCS file: /repository/php-src/ext/curl/interface.c,v
retrieving revision 1.47
diff -u -r1.47 interface.c
--- interface.c 18 Aug 2004 21:27:24 -  1.47
+++ interface.c 19 Aug 2004 11:34:42 -
@@ -358,6 +358,12 @@
REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_1_0);
REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_1_1);

+#if LIBCURL_VERSION_NUM > 0x070907 /* CURL_TIMECOND_ is available since curl 7.9.7 */
+   REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFMODSINCE);
+   REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFUNMODSINCE);
+   REGISTER_CURL_CONSTANT(CURL_TIMECOND_LASTMOD);
+#endif
+
REGISTER_CURL_CONSTANT(CURLM_CALL_MULTI_PERFORM);
REGISTER_CURL_CONSTANT(CURLM_OK);
REGISTER_CURL_CONSTANT(CURLM_BAD_HANDLE);

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php