Re: [PHP-DEV] curl problem

2001-07-17 Thread Stanislav Malyshev

CV Sterling has been fixing some other cURL stuff, but he's told me
CV (offlist) that he can't look at this problem until next week.
CV Hopefully someone else can stand up and take a quick look.

Generally, I think I know how to fix this in PHP. I am not copletely sure,
however, that cURL's behaviour is right (calling header write function
when the option explicitly says I do not want no header). I think I will
try to fix it anyway, since it should not hurt even if cURL is fixed
later.

-- 
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] curl problem

2001-07-17 Thread Stanislav Malyshev

CV Sterling has been fixing some other cURL stuff, but he's told me
CV (offlist) that he can't look at this problem until next week.
CV Hopefully someone else can stand up and take a quick look.

Could you please try the attached patch? It seems to me that it results in
a sane behaviour, while not breaking any of the features.

-- 
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115



? curl.c.flc
? curl.diff
Index: curl.c
===
RCS file: /repository/php4/ext/curl/curl.c,v
retrieving revision 1.70
diff -u -b -r1.70 curl.c
--- curl.c  13 Jul 2001 16:44:44 -  1.70
+++ curl.c  17 Jul 2001 11:15:14 -
@@ -250,6 +250,7 @@
 #define PHP_CURL_RETURN 4
 #define PHP_CURL_ASCII  5
 #define PHP_CURL_BINARY 6
+#define PHP_CURL_IGNORE 7
 
 /* {{{ curl_write
  */
@@ -416,6 +417,10 @@
zval_ptr_dtor(retval);
break;
}
+   case PHP_CURL_IGNORE:
+   length = size * nmemb;
+
+   break;
}

return length;
@@ -546,6 +551,7 @@
ch-handlers-write-method = PHP_CURL_STDOUT;
ch-handlers-write-type   = PHP_CURL_ASCII;
ch-handlers-read-method  = PHP_CURL_DIRECT;
+   ch-handlers-write_header-method = PHP_CURL_IGNORE;
 
curl_easy_setopt(ch-cp, CURLOPT_NOPROGRESS,1);
curl_easy_setopt(ch-cp, CURLOPT_VERBOSE,   0);


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


Re: [PHP-DEV] curl problem

2001-07-16 Thread Colin Viebrock

 Seems like recent cURL module always outputs the header to STDOUT, even if
 the curl_setopt ($c, CURLOPT_HEADER, 0) was called. I do not know if it's
 cURL library or PHP cURL module problem, but obviously it is going to
 break a lot of scripts this way.

I reported this already: bug #12018

Sterling has been fixing some other cURL stuff, but he's told me (offlist)
that he can't look at this problem until next week.  Hopefully someone else
can stand up and take a quick look.

- Colin


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] curl problem

2001-07-16 Thread Stanislav Malyshev

CV I reported this already: bug #12018
CV
CV Sterling has been fixing some other cURL stuff, but he's told me (offlist)
CV that he can't look at this problem until next week.  Hopefully someone else
CV can stand up and take a quick look.

Seems that I know what is the problem - header handler gets always called,
no matter what flags. I will check deeper tomorrow.
-- 
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]