#24725 [Asn]: cURL CURLOPT_ENCODING does not appear to work

2003-07-22 Thread Julian_bond at voidstar dot com
 ID:   24725
 User updated by:  Julian_bond at voidstar dot com
 Reported By:  Julian_bond at voidstar dot com
 Status:   Assigned
 Bug Type: cURL related
 Operating System: Redhat 7.3 and MS Win
 PHP Version:  4.3.2
 Assigned To:  edink
 New Comment:

php4-STABLE-200307220930

To confirm. The bug fix worked and HTTP_ACCEPT_ENCODING is now
generated. On Unix with zlib bound into curl, it's correctly requesting
gzip, deflate and decoding the result.

On Windows with php_curl, it's generating identity as the only
supported compression. Almost certainly because php_curl.dll doesn't
yet bind zlib.

Thanks guys. Almost there.


Previous Comments:


[2003-07-20 10:54:37] Julian_bond at voidstar dot com

Got there eventually. I can confirm that the snapshot still has the
same problem on *nix
redhat/7.3 php/4.3.3RC2-dev 
libcurl/7.10.5 OpenSSL/0.9.6b zlib/1.1.4
php4-STABLE-200307201330

From the comments below, it sounds like the bug has been found. Happy
to test it once it's in the snapshot.



[2003-07-20 10:22:54] [EMAIL PROTECTED]

There was a small bug in the php curl, but it's fixed now.
Now the encoding works as long as libcurl is linked with zlib. (Edin,
is the libcurl used by win32 stuff linked with it??)




[2003-07-20 08:42:16] [EMAIL PROTECTED]

Just a build issue with curl libs. (Edin, can you add zlib in the curl
stuff?)




[2003-07-20 08:38:41] [EMAIL PROTECTED]

DO NOT use 'Add Comment' when you edit your own report!!!
(use this url: http://bugs.php.net/bug.php?id=24725edit=2)




[2003-07-20 08:26:50] julian_bond at voidstar dot com

Installed MS Win release. phpinfo() reports
php/4.3.3RC2-dev, libcurl/7.10.5 OpenSSL/0.9.7b
No change. Curl is still not generating the header. php-curl still does
not appear to support zlib.

Currently creating a test environment where I can test php under Redhat
as I found the problem on a production server. Might take a little
while. Will report back.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/24725

-- 
Edit this bug report at http://bugs.php.net/?id=24725edit=1



#24725 [Fbk-Opn]: cURL CURLOPT_ENCODING does not appear to work

2003-07-22 Thread Julian_bond at voidstar dot com
 ID:   24725
 User updated by:  Julian_bond at voidstar dot com
 Reported By:  Julian_bond at voidstar dot com
-Status:   Feedback
+Status:   Open
 Bug Type: cURL related
 Operating System: Redhat 7.3 and MS Win
 PHP Version:  4.3.2
 Assigned To:  edink
 New Comment:

Success! It now works in MS win as well. And phpinfo() reports
libcurl/7.10.5 OpenSSL/0.9.7b zlib/1.1.4

Many thanks.


Previous Comments:


[2003-07-22 07:29:55] [EMAIL PROTECTED]

Could you please try:

ftp://ftp.proventum.net/misc/php_curl.dll

instead of the originial extension/php_curl.dll?



[2003-07-22 05:45:29] Julian_bond at voidstar dot com

php4-STABLE-200307220930

To confirm. The bug fix worked and HTTP_ACCEPT_ENCODING is now
generated. On Unix with zlib bound into curl, it's correctly requesting
gzip, deflate and decoding the result.

On Windows with php_curl, it's generating identity as the only
supported compression. Almost certainly because php_curl.dll doesn't
yet bind zlib.

Thanks guys. Almost there.



[2003-07-20 10:54:37] Julian_bond at voidstar dot com

Got there eventually. I can confirm that the snapshot still has the
same problem on *nix
redhat/7.3 php/4.3.3RC2-dev 
libcurl/7.10.5 OpenSSL/0.9.6b zlib/1.1.4
php4-STABLE-200307201330

From the comments below, it sounds like the bug has been found. Happy
to test it once it's in the snapshot.



[2003-07-20 10:22:54] [EMAIL PROTECTED]

There was a small bug in the php curl, but it's fixed now.
Now the encoding works as long as libcurl is linked with zlib. (Edin,
is the libcurl used by win32 stuff linked with it??)




[2003-07-20 08:42:16] [EMAIL PROTECTED]

Just a build issue with curl libs. (Edin, can you add zlib in the curl
stuff?)




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/24725

-- 
Edit this bug report at http://bugs.php.net/?id=24725edit=1



#24725 [NEW]: cURL CURLOPT_ENCODING does not appear to work

2003-07-20 Thread Julian_bond at voidstar dot com
From: Julian_bond at voidstar dot com
Operating system: Redhat 7.3 and MS Win
PHP version:  4.3.2
PHP Bug Type: cURL related
Bug description:  cURL CURLOPT_ENCODING does not appear to work

Description:

Redhat/7.3 php/4.3.2 libcurl/7.10.5 OpenSSL/0.9.6b zlib/1.1.4
MS Win php/4.3.2 libcurl/7.10.5 OpenSSL/0.9.7b
MS Win php/4.3.3RC1 libcurl/7.10.5 OpenSSL/0.9.7b

See also:
http://bugs.php.net/bug.php?id=23048
http://bugs.php.net/bug.php?id=21995
http://bugs.php.net/bug.php?id=23702

According to the libcurl docuentation, 
  curl_setopt ($ch, CURLOPT_ENCODING,);
should generate a header 
  HTTP_ACCEPT_ENCODING: gzip,deflate 
And then autodecode the returned data if the remote server supports
compression. However in the above three PHP releases it never does.
Reading the three bug reports above, it appears that support for this
option call may have been added to php 4.3.2 and so the problem is
currently viewed as a documentation problem. However after repeated tests,
it still appears to be missing from either php and/or libcurl and hence
this bug report. The libcurl crew deny responsibility(!) and point at the
php implementation. Using curl from the command line with the --compressed
option I can see the header and auto-decoding working but I don't have the
facilities to check the libcurl library except from inside php.

The libcurl readme
http://cvs.php.net/co.php/curl/lib/README.encoding?r=1.3
says that The library zlib is required for this feature. but as can be
seen above from the version report, php_curl.dll for windows does not
appear to bind the zlib library, so even if the parameter option is being
passed to libcurl, it probably wouldn't work anyway.

Reproduce code:
---
  $ch = curl_init(http://www.voidstar.com/temp/accept.php;);
  curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt ($ch, CURLOPT_ENCODING,);
  curl_setopt ($ch, CURLOPT_HEADER, 1);

  $data = curl_exec($ch);

  curl_close ($ch);

  print pre . htmlentities($data) . /pre;


Expected result:

http://www.voidstar.com/temp/accept.php prints the headers it receives.
It's running on a server with zlib support compiled into php and
zlib.output_compression = on This can be seen by using a browser that
supports gzip to navigate to the url above. In this case the header can be
seen.

The reproduce code above should generate the accept_encoding header which
should then result in it being mirrored back to curl which then displays
it.

 HTTP_ACCEPT_ENCODING: gzip,deflate

Actual result:
--
Missing header
 HTTP_ACCEPT_ENCODING: gzip,deflate

-- 
Edit bug report at http://bugs.php.net/?id=24725edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=24725r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=24725r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=24725r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=24725r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24725r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=24725r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=24725r=support
Expected behavior:  http://bugs.php.net/fix.php?id=24725r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=24725r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=24725r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=24725r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24725r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=24725r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=24725r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=24725r=gnused



#24725 [Com]: cURL CURLOPT_ENCODING does not appear to work

2003-07-20 Thread julian_bond at voidstar dot com
 ID:   24725
 Comment by:   julian_bond at voidstar dot com
 Reported By:  Julian_bond at voidstar dot com
 Status:   Feedback
 Bug Type: cURL related
 Operating System: Redhat 7.3 and MS Win
 PHP Version:  4.3.2
 New Comment:

Installed MS Win release. phpinfo() reports
php/4.3.3RC2-dev, libcurl/7.10.5 OpenSSL/0.9.7b
No change. Curl is still not generating the header. php-curl still does
not appear to support zlib.

Currently creating a test environment where I can test php under Redhat
as I found the problem on a production server. Might take a little
while. Will report back.


Previous Comments:


[2003-07-20 07:09:39] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



[2003-07-20 06:56:49] Julian_bond at voidstar dot com

Description:

Redhat/7.3 php/4.3.2 libcurl/7.10.5 OpenSSL/0.9.6b zlib/1.1.4
MS Win php/4.3.2 libcurl/7.10.5 OpenSSL/0.9.7b
MS Win php/4.3.3RC1 libcurl/7.10.5 OpenSSL/0.9.7b

See also:
http://bugs.php.net/bug.php?id=23048
http://bugs.php.net/bug.php?id=21995
http://bugs.php.net/bug.php?id=23702

According to the libcurl docuentation, 
  curl_setopt ($ch, CURLOPT_ENCODING,);
should generate a header 
  HTTP_ACCEPT_ENCODING: gzip,deflate 
And then autodecode the returned data if the remote server supports
compression. However in the above three PHP releases it never does.
Reading the three bug reports above, it appears that support for this
option call may have been added to php 4.3.2 and so the problem is
currently viewed as a documentation problem. However after repeated
tests, it still appears to be missing from either php and/or libcurl
and hence this bug report. The libcurl crew deny responsibility(!) and
point at the php implementation. Using curl from the command line with
the --compressed option I can see the header and auto-decoding working
but I don't have the facilities to check the libcurl library except
from inside php.

The libcurl readme
http://cvs.php.net/co.php/curl/lib/README.encoding?r=1.3
says that The library zlib is required for this feature. but as can
be seen above from the version report, php_curl.dll for windows does
not appear to bind the zlib library, so even if the parameter option is
being passed to libcurl, it probably wouldn't work anyway.

Reproduce code:
---
  $ch = curl_init(http://www.voidstar.com/temp/accept.php;);
  curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt ($ch, CURLOPT_ENCODING,);
  curl_setopt ($ch, CURLOPT_HEADER, 1);

  $data = curl_exec($ch);

  curl_close ($ch);

  print pre . htmlentities($data) . /pre;


Expected result:

http://www.voidstar.com/temp/accept.php prints the headers it receives.
It's running on a server with zlib support compiled into php and
zlib.output_compression = on This can be seen by using a browser that
supports gzip to navigate to the url above. In this case the header can
be seen.

The reproduce code above should generate the accept_encoding header
which should then result in it being mirrored back to curl which then
displays it.

 HTTP_ACCEPT_ENCODING: gzip,deflate

Actual result:
--
Missing header
 HTTP_ACCEPT_ENCODING: gzip,deflate





-- 
Edit this bug report at http://bugs.php.net/?id=24725edit=1



#24725 [Asn]: cURL CURLOPT_ENCODING does not appear to work

2003-07-20 Thread Julian_bond at voidstar dot com
 ID:   24725
 User updated by:  Julian_bond at voidstar dot com
 Reported By:  Julian_bond at voidstar dot com
 Status:   Assigned
 Bug Type: cURL related
-Operating System: win32 only
+Operating System: Redhat 7.3 and MS Win
 PHP Version:  4.3.2
 Assigned To:  edink
 New Comment:

Got there eventually. I can confirm that the snapshot still has the
same problem on *nix
redhat/7.3 php/4.3.3RC2-dev 
libcurl/7.10.5 OpenSSL/0.9.6b zlib/1.1.4
php4-STABLE-200307201330

From the comments below, it sounds like the bug has been found. Happy
to test it once it's in the snapshot.


Previous Comments:


[2003-07-20 10:22:54] [EMAIL PROTECTED]

There was a small bug in the php curl, but it's fixed now.
Now the encoding works as long as libcurl is linked with zlib. (Edin,
is the libcurl used by win32 stuff linked with it??)




[2003-07-20 08:42:16] [EMAIL PROTECTED]

Just a build issue with curl libs. (Edin, can you add zlib in the curl
stuff?)




[2003-07-20 08:38:41] [EMAIL PROTECTED]

DO NOT use 'Add Comment' when you edit your own report!!!
(use this url: http://bugs.php.net/bug.php?id=24725edit=2)




[2003-07-20 08:26:50] julian_bond at voidstar dot com

Installed MS Win release. phpinfo() reports
php/4.3.3RC2-dev, libcurl/7.10.5 OpenSSL/0.9.7b
No change. Curl is still not generating the header. php-curl still does
not appear to support zlib.

Currently creating a test environment where I can test php under Redhat
as I found the problem on a production server. Might take a little
while. Will report back.



[2003-07-20 07:09:39] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/24725

-- 
Edit this bug report at http://bugs.php.net/?id=24725edit=1