[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2004-09-08 Thread changelog
changelog   Wed Sep  8 20:34:42 2004 EDT

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/diff.php/php-src/ChangeLog?r1=1.1740r2=1.1741ty=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.1740 php-src/ChangeLog:1.1741
--- php-src/ChangeLog:1.1740Tue Sep  7 20:32:37 2004
+++ php-src/ChangeLog   Wed Sep  8 20:34:41 2004
@@ -1,3 +1,61 @@
+2004-09-08  Andi Gutmans  [EMAIL PROTECTED]
+
+* ZendEngine2/zend_builtin_functions.c:
+  - Fix bug #28054 by preventing printing out bogus information in backtrace
+when in error handler (still doesn't know all information but at least
+it's not bogus)
+
+2004-09-08  Sara Golemon  [EMAIL PROTECTED]
+
+* ext/standard/http_fopen_wrapper.c:
+  -** empty log message ***
+
+2004-09-08  Andi Gutmans  [EMAIL PROTECTED]
+
+* ZendEngine2/zend_compile.h
+  ZendEngine2/zend_exceptions.c
+  ZendEngine2/zend_execute.c
+  ZendEngine2/zend_execute.h
+  ZendEngine2/zend_execute_API.c
+  ZendEngine2/zend_opcode.c
+  ZendEngine2/zend_vm.h
+  ZendEngine2/zend_vm_handlers.h
+  ZendEngine2/zend_vm_spec.h:
+  - Some architectural changes:
+   a) We specialize opcodes according to op_type fields. Each opcode has to
+  be marked with which op_type's it uses.
+   b) We support different execution methods. Function handlers, switch()
+  and goto dispatching. goto seems to be the fastest but it really
+  depends on the compiler and how well it optimizes. I suggest playing
+  around with optimization flags.
+  
+  - Warning: Things might break so keep us posted on how things are going.
+(Dmitry, Andi)
+
+2004-09-08  Sara Golemon  [EMAIL PROTECTED]
+
+* (PHP_5_0)
+  main/streams/streams.c:
+  MFH (r.163) Handle maxlen when stream can't be mmaped
+
+* main/streams/streams.c:
+  Handle maxlen when stream can't be mmaped
+
+2004-09-08  Rob Richards  [EMAIL PROTECTED]
+
+* (PHP_5_0)
+  ext/xsl/php_xsl.c
+  ext/xsl/php_xsl.h
+  ext/xsl/xsltprocessor.c:
+  MHF: fix issue with multiple xsl objects using registerPHPfunctions
+   - also fixes threading issue
+
+* ext/xsl/php_xsl.c
+  ext/xsl/php_xsl.h
+  ext/xsl/xsltprocessor.c:
+  fix issue with multiple xsl objects using registerPHPfunctions
+   - also fixes threading issue
+
 2004-09-07  Sara Golemon  [EMAIL PROTECTED]
 
 * ext/standard/http_fopen_wrapper.c:
@@ -9373,7 +9431,7 @@
 2004-03-18  Pierre-Alain Joye  [EMAIL PROTECTED]
 
 * ext/gd/tests/bug27582_2.phpt:
-  - Fix the test description and $Id: ChangeLog,v 1.1740 2004/09/08 00:32:37 
changelog Exp $
+  - Fix the test description and $Id: ChangeLog,v 1.1741 2004/09/09 00:34:41 
changelog Exp $
 
 2004-03-18  Derick Rethans  [EMAIL PROTECTED]
 


RE: [PHP-CVS] cvs: php-src /ext/soap php_encoding.c

2004-09-08 Thread Derick Rethans
On Wed, 8 Sep 2004, Dmitry Stogov wrote:

 Hi,

 I should make a decision.
 Can anybody point me to some utf-8 specification document?

http://www.unicode.org/faq/utf_bom.html#37
http://www.unicode.org/versions/Unicode4.0.0/ch03.pdf
section 3.9, which proves that Rob is right and I was wrong for using
UTF-8 as Unicode encoding standard.

(Though theoretically you could use UTF8 for 4 byte encodings up to 6
bytes).

Besides this, I do no think that we should introduce copied versions
into our extensions, but just block it from being used with a configure
check for this specific libxml2 version. This also should not be done on
an extension level, but generally for PHP. (Or in case that we really
want to add a copied (+fixed) function, we should do that in ext/libxml
so that all extensions can make use of this.

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: CVSROOT / avail

2004-09-08 Thread Rasmus Lerdorf
rasmus  Wed Sep  8 04:26:50 2004 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  karma for new accounts
  
  http://cvs.php.net/diff.php/CVSROOT/avail?r1=1.903r2=1.904ty=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.903 CVSROOT/avail:1.904
--- CVSROOT/avail:1.903 Thu Sep  2 11:50:53 2004
+++ CVSROOT/avail   Wed Sep  8 04:26:45 2004
@@ -29,7 +29,7 @@
 # The PHP Documentation Group maintains the documentation and its
 # translations.
 
-avail|frogger,coldocean,alan_k,fleaslob,torben,lynch,kk,ted,paul,mbritton,coar,joey,bibi,mrobinso,perugini,tzwenny,hirokawa,drews,paulsen,hartmann,leon,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,goba,samesch,jon,soneca,ronabop,glace,latoserver,rafael,jan,jcmeloni,chrullrich,mk,sebastian,troels,mathieu,phaethon,mj,corean,pandach,cycle98,vizvil,regina,cynic,jpm,dams,karoora,pcraft,suvia,zak,zimt,jmoore,ftfuture,ag315,bbonev,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,cnewbill,fuzzy74,bjoern,fams,smasiello,dim,lucasr,cpereira,ernani,theseer,noribsd,subjective,ufux,hadar_p,asautins,dbenson,aleczapka,tom,amiller,cortesi,rarruda,betz,philip,alindeman,thyla,cucinato,zyprexia,tpug,mitja,conni,sts,georg,nmav,subbie,leszek,spheroid,slawek,alan_dangelo,ae,nohn,kaser01,visualmind,kurtz,luk,tronic,moh,bernd,yohgaki,fujimoto,gerzson,webler,spooky,cece,daniel,boo,nhoizey,joerg,imajes,hakan,chief977,shlomi,raful,yuval,tomer,barak,ido,mork,lior,gal,adiju,cr_depend,florian,kappu,muricaru,dt,critix,ck,costra,fancao0515,tibee,eriksson,wenz,bs,anderson,tal,sander,matroz,ave,adu,mmeier,wentzel,scaro,aspinei,lmaxcar,manuzhai,darvina,peter,maxim,romakhin,n0nick,attila,sagi,kai,microbrain,rhheo,shimi,k.schroeder,djworld,emil,lboshell,netholic,dmitry83,progcom,verdana,yincheng,surfmax,nicos,chregu,msopacua,bbd,cyril,gregory,hudzilla,klean,mignoni,wiesemann,xqi,mersal,zruya,sean,staybyte,aber_sabeel,alzahrani,thomaslio,sfox,jippie,antonio,ahxiao,akcakayaa,allhibi,aner,black,class007,digo,dima,dorons,eshare,hpop1,itay,juppie,mrmatrix,saad,thomasgm,xbite,tobsn,jome,analytik,outsider,heymarcel,asmodean,bader,elmaystro,sp,truelight,gnuhacker,_batman_,sachat,dallas,dejan,zer0fill,steve3d,lm92,bradmssw,tahani,victor,erica,simonh,phpman,mrphp,notarius,joseph,mmkhajah,mohammed,proton,klootz,takashima,leoca,ahmad,abobader,fboudot,wurm,hakawy,felix,ahmedss,mahrous2020,yorgo,gal_ga,abodive,ama,andras,hassen,jkhdk,okamura,popov,xman,fernandoc,avenger,hwin,tix,alrehawi_,liuming,ramysaweres,astone,shiflett,jaenecke,bdensley,adamchan,jingfs,murphy,potatotsang,the_q,jsheets,xelis,equerci,phpcatala,tofanini,umut,kriga,ray,royhuggins,logician,almanar,alexws,gonik,haiaw,lkwang_cn,shadowwulf,telecart,pongsakorn,naveed,shivas,tularis,angela,decorj,hitcho,kevinkee,nmee,thx1140,crotalus,didou,novotnyr,sil,traduim,gui,mgf,ivanr,michal,tsirman,momo,cysoft,firefox,kouber,mipac,muslem,tomysk,vemarkov,garth,lord_lele,stone,laacz,retnug,ernestyang,hatem,house,luisdaniel,nizar,nvivo,seth,tomh,danguer,adam,nio,wassago,beeven,colacino,zvaranka,cesarguru,chubu,dark2907,portoban,reven,wizzard,sywr,koendw83,rylin,webstudio,jsjohnst,dmanusset,et,pitiphan,mbr,cdalar,alrashoudi,hafid,enough,zhouhao007,jnorbi,lorenzohgh,denisr,coder03,jcclaros,thomas,freeman,rioter,jschultz,davey,belleto,jtacon,yuw,ohill,elfyn,noam,nathan,salman,cheezy,ene,rezaiqbal,purnomo,dufiga_php,ftp_geo,udhien,prio,luckyguy354,maf,handi,meme,satiri,maddankara,rildo,hd,ali,lpj,adhitama,engkongs,preilly,dave,marcelo,curt,fd,javi,mrmaster,fa,nlopess,vrana,apaxx,pjotrik,marduk,narcotia1234,enloma,trizo,xmadda,redshift,alifikri,coder,dodol_maniac,eflorin,adywarna,kyokpae,milans,lovchy,spermwhale,phaze,baoengb,derek,yannick,daan,xxiengb,ott,mg,kennyt,tomsommer,poz,zamolxe,bishmila,ph1,irchtml,rogamer,bortolini,sapfir,guru,ahmed,robinhood,sohli,amt,romain,hlecuanda,thessoro,nforbes,jolan,laze,bagilevi,young,shakaali,chokobo,portalufpa,teecee,blindman,holst,schst,mnv,sodhi,aidan,jellybob,lauer,shenkong,jad|phpdoc,ZendAPI,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh

RE: [PHP-CVS] cvs: php-src /ext/soap php_encoding.c

2004-09-08 Thread Dmitry Stogov
OK. I willn't add 6-bytes characters suppport.

You are right. The proper place for this function is ext/libxml.
I will glad to use it, if somebody will implement this function there.

Thanks. Dmitry.

 -Original Message-
 From: Derick Rethans [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 08, 2004 10:34
 To: Dmitry Stogov
 Cc: 'Rob Richards'; 'Marcus Boerger'; 'Dmitry Stogov'; 
 [EMAIL PROTECTED]
 Subject: RE: [PHP-CVS] cvs: php-src /ext/soap php_encoding.c
 
 
 On Wed, 8 Sep 2004, Dmitry Stogov wrote:
 
  Hi,
 
  I should make a decision.
  Can anybody point me to some utf-8 specification document?
 
 http://www.unicode.org/faq/utf_bom.html#37
 http://www.unicode.org/versions/Unicode4.0.0/ch03.pdf
 section 3.9, which proves that Rob is right and I was wrong 
 for using UTF-8 as Unicode encoding standard.
 
 (Though theoretically you could use UTF8 for 4 byte encodings 
 up to 6 bytes).
 
 Besides this, I do no think that we should introduce copied 
 versions into our extensions, but just block it from being 
 used with a configure check for this specific libxml2 
 version. This also should not be done on an extension level, 
 but generally for PHP. (Or in case that we really want to add 
 a copied (+fixed) function, we should do that in ext/libxml 
 so that all extensions can make use of this.
 
 Derick
 
 -- 
 Derick Rethans
 http://derickrethans.nl | http://ez.no | http://xdebug.org
 
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/soap php_encoding.c

2004-09-08 Thread Rob Richards
That you. At least I know I'm still borderline and havent gone completely
insane.
It was changed in RFC 3629

It should probably be added in ext/libxml as libxml 2.6.13 (and it looks
like .12 as well) are broken badly here when a bug fix was done in the
function. Previous versions have a bug with the 2 byte check (certain
invalid strings are returned as valid). Dmitry's code is almost exactly as
what's in libxml cvs for the function now so the code should be at least
used for = 2.6.13.

Rob

- Original Message - 
From: Derick Rethans

  I should make a decision.
  Can anybody point me to some utf-8 specification document?

 http://www.unicode.org/faq/utf_bom.html#37
 http://www.unicode.org/versions/Unicode4.0.0/ch03.pdf
 section 3.9, which proves that Rob is right and I was wrong for using
 UTF-8 as Unicode encoding standard.

 (Though theoretically you could use UTF8 for 4 byte encodings up to 6
 bytes).

 Besides this, I do no think that we should introduce copied versions
 into our extensions, but just block it from being used with a configure
 check for this specific libxml2 version. This also should not be done on
 an extension level, but generally for PHP. (Or in case that we really
 want to add a copied (+fixed) function, we should do that in ext/libxml
 so that all extensions can make use of this.

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_0) /ext/libxml libxml.c php_libxml.h

2004-09-08 Thread Rob Richards
rrichards   Wed Sep  8 06:16:58 2004 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/libxml libxml.c php_libxml.h 
  Log:
  MFH: implement php_libxml_xmlCheckUTF8
   - workaround for = libxml2-2.6.13 function
  
http://cvs.php.net/diff.php/php-src/ext/libxml/libxml.c?r1=1.18.2.3r2=1.18.2.4ty=u
Index: php-src/ext/libxml/libxml.c
diff -u php-src/ext/libxml/libxml.c:1.18.2.3 php-src/ext/libxml/libxml.c:1.18.2.4
--- php-src/ext/libxml/libxml.c:1.18.2.3Mon Sep  6 06:18:29 2004
+++ php-src/ext/libxml/libxml.c Wed Sep  8 06:16:57 2004
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: libxml.c,v 1.18.2.3 2004/09/06 10:18:29 rrichards Exp $ */
+/* $Id: libxml.c,v 1.18.2.4 2004/09/08 10:16:57 rrichards Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -505,6 +505,32 @@
 
 
 /* {{{ Common functions shared by extensions */
+int php_libxml_xmlCheckUTF8(const unsigned char *s)
+{
+   int i;
+   unsigned char c;
+
+   for (i = 0; (c = s[i++]);) {
+   if ((c  0x80) == 0) {
+   } else if ((c  0xe0) == 0xc0) {
+   if ((s[i++]  0xc0) != 0x80) {
+   return 0;
+   }
+   } else if ((c  0xf0) == 0xe0) {
+   if ((s[i++]  0xc0) != 0x80 || (s[i++]  0xc0) != 0x80) {
+   return 0;
+   }
+   } else if ((c  0xf8) == 0xf0) {
+   if ((s[i++]  0xc0) != 0x80 || (s[i++]  0xc0) != 0x80 || 
(s[i++]  0xc0) != 0x80) {
+   return 0;
+   }
+   } else {
+   return 0;
+   }
+   }
+   return 1;
+}
+
 int php_libxml_register_export(zend_class_entry *ce, php_libxml_export_node 
export_function)
 {
php_libxml_func_handler export_hnd;
http://cvs.php.net/diff.php/php-src/ext/libxml/php_libxml.h?r1=1.8.2.1r2=1.8.2.2ty=u
Index: php-src/ext/libxml/php_libxml.h
diff -u php-src/ext/libxml/php_libxml.h:1.8.2.1 php-src/ext/libxml/php_libxml.h:1.8.2.2
--- php-src/ext/libxml/php_libxml.h:1.8.2.1 Thu Aug  5 17:03:15 2004
+++ php-src/ext/libxml/php_libxml.h Wed Sep  8 06:16:57 2004
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: php_libxml.h,v 1.8.2.1 2004/08/05 21:03:15 edink Exp $ */
+/* $Id: php_libxml.h,v 1.8.2.2 2004/09/08 10:16:57 rrichards Exp $ */
 
 #ifndef PHP_LIBXML_H
 #define PHP_LIBXML_H
@@ -80,6 +80,7 @@
 PHP_LIBXML_API void php_libxml_error_handler(void *ctx, const char *msg, ...);
 void php_libxml_ctx_warning(void *ctx, const char *msg, ...);
 void php_libxml_ctx_error(void *ctx, const char *msg, ...);
+PHP_LIBXML_API int php_libxml_xmlCheckUTF8(const unsigned char *s);
 
 #endif /* HAVE_LIBXML */
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard http_fopen_wrapper.c

2004-09-08 Thread Nuno Lopes
Hello Sara :)
This morning I've started testing this new feature and I've found some bugs:
* it is segfaulting on redirects
* the chunk decoding algorithm isn't working well. Just run a diff in thw 
output of both HTTP/1.0 and 1.1.

The only thing I can help is with backtraces:
* GDB: http://testes.aborla.net/gdb.txt
* Valgrind: http://testes.aborla.net/out.pid10721
* Test Script: http://testes.aborla.net/streams.php.txt
Nuno 

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard http_fopen_wrapper.c

2004-09-08 Thread Sascha Schumann
Well well well.  A basic HTTP client such as PHP does not
gain anything from supporting HTTP/1.1.  Until the time this
feature is proven to be stable (especially the dechunking is
not always easy to do correctly and reliably in C), the code
should live outside of the mainstream branch.
- Sascha (speaking as a web server developer)
On Wed, 8 Sep 2004, Nuno Lopes wrote:
Hello Sara :)
This morning I've started testing this new feature and I've found some bugs:
* it is segfaulting on redirects
* the chunk decoding algorithm isn't working well. Just run a diff in thw 
output of both HTTP/1.0 and 1.1.

The only thing I can help is with backtraces:
* GDB: http://testes.aborla.net/gdb.txt
* Valgrind: http://testes.aborla.net/out.pid10721
* Test Script: http://testes.aborla.net/streams.php.txt
Nuno 
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard http_fopen_wrapper.c

2004-09-08 Thread Nuno Lopes
Well well well.  A basic HTTP client such as PHP does not
gain anything from supporting HTTP/1.1.  Until the time this
feature is proven to be stable (especially the dechunking is
not always easy to do correctly and reliably in C), the code
should live outside of the mainstream branch.
- Sascha (speaking as a web server developer)

(speaking as a student :))
HTTP/1.1 supports compressing, which is good to save bandwidth.
I've done what I know, that is testing and generating backtraces. Now 
someones needs to fix it :)

As the code is only in HEAD, there is no real problem, because untill PHP 
5.1 goes out, I'll test this extensively :)

Nuno 

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard http_fopen_wrapper.c

2004-09-08 Thread Sascha Schumann
HTTP/1.1 supports compressing, which is good to save bandwidth.
As does HTTP/1.0.  Refer to RFC 1945, section 3.5 Content
Codings.
As the code is only in HEAD, there is no real problem, because untill PHP 5.1 
goes out, I'll test this extensively :)
That is quite optimistic.
If someone needs HTTP/1.1 support, he can use curl, or call
wget, or whatever.  There is no reason we would need to add
this feature to PHP's standard set of features.
- Sascha
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-CVS] cvs: php-src(PHP_5_0) /ext/soap php_encoding.c

2004-09-08 Thread Andi Gutmans
OK, so please #if it with libxml2 version number once it is clear what the 
next version is.

Thanks,
Andi
At 09:17 AM 9/8/2004 +0400, Dmitry Stogov wrote:
The bug is fixed in libxml2 CVS HEAD, but it exists in latest stable
version.
Dmitry.
 -Original Message-
 From: Andi Gutmans [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 07, 2004 22:51
 To: Dmitry Stogov; [EMAIL PROTECTED]
 Subject: Re: [PHP-CVS] cvs: php-src(PHP_5_0) /ext/soap php_encoding.c


 Is this fixed in libxml2? If so, maybe you should put a version check
 around these functions so that it's clear why this code
 exists (and so that
 we can nuke it in future?)

 Andi

 At 02:41 PM 9/7/2004 +, Dmitry Stogov wrote:
 dmitry  Tue Sep  7 10:41:29 2004 EDT
 
Modified files:  (Branch: PHP_5_0)
  /php-src/ext/soap   php_encoding.c
Log:
Make ext/soap work around libxml2 bug in xmlCheckUTF8
 (2.6.7-2.6.13)
 
 
 http://cvs.php.net/diff.php/php-src/ext/soap/php_encoding.c?r
 1=1.71.2.3
 r2=1.71.2.4ty=u
 Index: php-src/ext/soap/php_encoding.c
 diff -u php-src/ext/soap/php_encoding.c:1.71.2.3
 php-src/ext/soap/php_encoding.c:1.71.2.4
 --- php-src/ext/soap/php_encoding.c:1.71.2.3Thu Aug 26
 14:36:46 2004
 +++ php-src/ext/soap/php_encoding.c Tue Sep  7 10:41:29 2004
 @@ -17,7 +17,7 @@
 |  Dmitry Stogov [EMAIL PROTECTED]
   |
 
 +
 --+
   */
 -/* $Id: php_encoding.c,v 1.71.2.3 2004/08/26 18:36:46
 dmitry Exp $ */
 +/* $Id: php_encoding.c,v 1.71.2.4 2004/09/07 14:41:29
 dmitry Exp $ */
 
   #include time.h
 
 @@ -581,6 +581,32 @@
  return ret;
   }
 
 +static int php_soap_xmlCheckUTF8(const unsigned char *s)
 +{
 +   int i;
 +   unsigned char c;
 +
 +   for (i = 0; (c = s[i++]);) {
 +   if ((c  0x80) == 0) {
 +   } else if ((c  0xe0) == 0xc0) {
 +   if ((s[i++]  0xc0) != 0x80) {
 +   return 0;
 +   }
 +   } else if ((c  0xf0) == 0xe0) {
 +   if ((s[i++]  0xc0) != 0x80 ||
 (s[i++]  0xc0)
 + !=
 0x80) {
 +   return 0;
 +   }
 +   } else if ((c  0xf8) == 0xf0) {
 +   if ((s[i++]  0xc0) != 0x80 ||
 (s[i++]  0xc0)
 + !=
 0x80 || (s[i++]  0xc0) != 0x80) {
 +   return 0;
 +   }
 +   } else {
 +   return 0;
 +   }
 +   }
 +   return 1;
 +}
 +
   static xmlNodePtr to_xml_string(encodeTypePtr type, zval *data, int
  style, xmlNodePtr parent)
   {
  xmlNodePtr ret;
 @@ -612,12 +638,12 @@
  efree(str);
  str = estrdup(xmlBufferContent(out));
  new_len = n;
 -   } else if (!xmlCheckUTF8(str)) {
 +   } else if (!php_soap_xmlCheckUTF8(str)) {
  soap_error1(E_ERROR,  Encoding:
 string '%s'
 is
  not a valid utf-8 string, str);
  }
  xmlBufferFree(out);
  xmlBufferFree(in);
 -   } else if (!xmlCheckUTF8(str)) {
 +   } else if (!php_soap_xmlCheckUTF8(str)) {
  soap_error1(E_ERROR,  Encoding: string
 '%s' is not a
  valid utf-8 string, str);
  }
 
 
 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-CVS] cvs: php-src /ext/xsl php_xsl.c php_xsl.h xsltprocessor.c

2004-09-08 Thread Rob Richards
rrichards   Wed Sep  8 12:54:17 2004 EDT

  Modified files:  
/php-src/ext/xslphp_xsl.c php_xsl.h xsltprocessor.c 
  Log:
  fix issue with multiple xsl objects using registerPHPfunctions
   - also fixes threading issue
  
http://cvs.php.net/diff.php/php-src/ext/xsl/php_xsl.c?r1=1.26r2=1.27ty=u
Index: php-src/ext/xsl/php_xsl.c
diff -u php-src/ext/xsl/php_xsl.c:1.26 php-src/ext/xsl/php_xsl.c:1.27
--- php-src/ext/xsl/php_xsl.c:1.26  Mon Aug 30 10:59:30 2004
+++ php-src/ext/xsl/php_xsl.c   Wed Sep  8 12:54:17 2004
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_xsl.c,v 1.26 2004/08/30 14:59:30 rrichards Exp $ */
+/* $Id: php_xsl.c,v 1.27 2004/09/08 16:54:17 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -140,6 +140,13 @@
exsltRegisterAll();
 #endif
  
+   xsltRegisterExtModuleFunction ((const xmlChar *) functionString,
+  (const xmlChar *) http://php.net/xsl;,
+  xsl_ext_function_string_php);
+   xsltRegisterExtModuleFunction ((const xmlChar *) function,
+  (const xmlChar *) http://php.net/xsl;,
+  xsl_ext_function_object_php);
+
REGISTER_LONG_CONSTANT(XSL_CLONE_AUTO,  0, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(XSL_CLONE_NEVER,-1, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(XSL_CLONE_ALWAYS,1, CONST_CS | 
CONST_PERSISTENT);
@@ -226,6 +233,12 @@
/* uncomment this line if you have INI entries
UNREGISTER_INI_ENTRIES();
*/
+
+   xsltUnregisterExtModuleFunction ((const xmlChar *) functionString,
+  (const xmlChar *) http://php.net/xsl;);
+   xsltUnregisterExtModuleFunction ((const xmlChar *) function,
+  (const xmlChar *) http://php.net/xsl;);
+
xsltCleanupGlobals();
 
return SUCCESS;
http://cvs.php.net/diff.php/php-src/ext/xsl/php_xsl.h?r1=1.11r2=1.12ty=u
Index: php-src/ext/xsl/php_xsl.h
diff -u php-src/ext/xsl/php_xsl.h:1.11 php-src/ext/xsl/php_xsl.h:1.12
--- php-src/ext/xsl/php_xsl.h:1.11  Wed Jul 28 08:40:53 2004
+++ php-src/ext/xsl/php_xsl.h   Wed Sep  8 12:54:17 2004
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_xsl.h,v 1.11 2004/07/28 12:40:53 chregu Exp $ */
+/* $Id: php_xsl.h,v 1.12 2004/09/08 16:54:17 rrichards Exp $ */
 
 #ifndef PHP_XSL_H
 #define PHP_XSL_H
@@ -63,6 +63,9 @@
 void php_xsl_set_object(zval *wrapper, void *obj TSRMLS_DC);
 void xsl_objects_free_storage(void *object TSRMLS_DC);
 zval *php_xsl_create_object(xsltStylesheetPtr obj, int *found, zval *wrapper_in, zval 
*return_value  TSRMLS_DC);
+
+void xsl_ext_function_string_php(xmlXPathParserContextPtr ctxt, int nargs);
+void xsl_ext_function_object_php(xmlXPathParserContextPtr ctxt, int nargs);
 
 #define REGISTER_XSL_CLASS(ce, name, parent_ce, funcs, entry) \
 INIT_CLASS_ENTRY(ce, name, funcs); \
http://cvs.php.net/diff.php/php-src/ext/xsl/xsltprocessor.c?r1=1.33r2=1.34ty=u
Index: php-src/ext/xsl/xsltprocessor.c
diff -u php-src/ext/xsl/xsltprocessor.c:1.33 php-src/ext/xsl/xsltprocessor.c:1.34
--- php-src/ext/xsl/xsltprocessor.c:1.33Tue Aug 10 04:00:06 2004
+++ php-src/ext/xsl/xsltprocessor.c Wed Sep  8 12:54:17 2004
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: xsltprocessor.c,v 1.33 2004/08/10 08:00:06 chregu Exp $ */
+/* $Id: xsltprocessor.c,v 1.34 2004/09/08 16:54:17 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -27,9 +27,6 @@
 #include php_xsl.h
 #include ext/libxml/php_libxml.h
 
-static void xsl_ext_function_string_php(xmlXPathParserContextPtr ctxt, int nargs);
-static void xsl_ext_function_object_php(xmlXPathParserContextPtr ctxt, int nargs);
-
 /*
 * class xsl_xsltprocessor 
 *
@@ -76,13 +73,6 @@
return (char *) value;
 }
 
-static void php_xsl_unregister_php_functions() {
-   xsltUnregisterExtModuleFunction ((const xmlChar *) functionString,
-  (const xmlChar *) http://php.net/xsl;);
-   xsltUnregisterExtModuleFunction ((const xmlChar *) function,
-  (const xmlChar *) http://php.net/xsl;);
-}
-
 
 /* {{{ php_xsl_xslt_make_params()
Translates a PHP array to a libxslt parameters array */
@@ -139,6 +129,7 @@
zval **args;
zval *retval;
int result, i, ret;
+   int error = 0;
zend_fcall_info fci;
zval handler;
xmlXPathObjectPtr obj;
@@ -148,13 +139,39 @@

TSRMLS_FETCH();
 
-   tctxt = xsltXPathGetTransformContext(ctxt);
-   if (tctxt == NULL) {
+   if (! zend_is_executing(TSRMLS_C)) {
xsltGenericError(xsltGenericErrorContext,
-   

[PHP-CVS] cvs: php-src(PHP_5_0) /ext/xsl php_xsl.c php_xsl.h xsltprocessor.c

2004-09-08 Thread Rob Richards
rrichards   Wed Sep  8 12:54:53 2004 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/xslphp_xsl.c php_xsl.h xsltprocessor.c 
  Log:
  MHF: fix issue with multiple xsl objects using registerPHPfunctions
   - also fixes threading issue
  
http://cvs.php.net/diff.php/php-src/ext/xsl/php_xsl.c?r1=1.22.2.3r2=1.22.2.4ty=u
Index: php-src/ext/xsl/php_xsl.c
diff -u php-src/ext/xsl/php_xsl.c:1.22.2.3 php-src/ext/xsl/php_xsl.c:1.22.2.4
--- php-src/ext/xsl/php_xsl.c:1.22.2.3  Mon Aug 30 11:00:07 2004
+++ php-src/ext/xsl/php_xsl.c   Wed Sep  8 12:54:53 2004
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_xsl.c,v 1.22.2.3 2004/08/30 15:00:07 rrichards Exp $ */
+/* $Id: php_xsl.c,v 1.22.2.4 2004/09/08 16:54:53 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -140,6 +140,13 @@
exsltRegisterAll();
 #endif
  
+   xsltRegisterExtModuleFunction ((const xmlChar *) functionString,
+  (const xmlChar *) http://php.net/xsl;,
+  xsl_ext_function_string_php);
+   xsltRegisterExtModuleFunction ((const xmlChar *) function,
+  (const xmlChar *) http://php.net/xsl;,
+  xsl_ext_function_object_php);
+
REGISTER_LONG_CONSTANT(XSL_CLONE_AUTO,  0, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(XSL_CLONE_NEVER,-1, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT(XSL_CLONE_ALWAYS,1, CONST_CS | 
CONST_PERSISTENT);
@@ -226,6 +233,12 @@
/* uncomment this line if you have INI entries
UNREGISTER_INI_ENTRIES();
*/
+
+   xsltUnregisterExtModuleFunction ((const xmlChar *) functionString,
+  (const xmlChar *) http://php.net/xsl;);
+   xsltUnregisterExtModuleFunction ((const xmlChar *) function,
+  (const xmlChar *) http://php.net/xsl;);
+
xsltCleanupGlobals();
 
return SUCCESS;
http://cvs.php.net/diff.php/php-src/ext/xsl/php_xsl.h?r1=1.10.2.1r2=1.10.2.2ty=u
Index: php-src/ext/xsl/php_xsl.h
diff -u php-src/ext/xsl/php_xsl.h:1.10.2.1 php-src/ext/xsl/php_xsl.h:1.10.2.2
--- php-src/ext/xsl/php_xsl.h:1.10.2.1  Wed Jul 28 08:42:16 2004
+++ php-src/ext/xsl/php_xsl.h   Wed Sep  8 12:54:53 2004
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_xsl.h,v 1.10.2.1 2004/07/28 12:42:16 chregu Exp $ */
+/* $Id: php_xsl.h,v 1.10.2.2 2004/09/08 16:54:53 rrichards Exp $ */
 
 #ifndef PHP_XSL_H
 #define PHP_XSL_H
@@ -63,6 +63,9 @@
 void php_xsl_set_object(zval *wrapper, void *obj TSRMLS_DC);
 void xsl_objects_free_storage(void *object TSRMLS_DC);
 zval *php_xsl_create_object(xsltStylesheetPtr obj, int *found, zval *wrapper_in, zval 
*return_value  TSRMLS_DC);
+
+void xsl_ext_function_string_php(xmlXPathParserContextPtr ctxt, int nargs);
+void xsl_ext_function_object_php(xmlXPathParserContextPtr ctxt, int nargs);
 
 #define REGISTER_XSL_CLASS(ce, name, parent_ce, funcs, entry) \
 INIT_CLASS_ENTRY(ce, name, funcs); \
http://cvs.php.net/diff.php/php-src/ext/xsl/xsltprocessor.c?r1=1.29.2.3r2=1.29.2.4ty=u
Index: php-src/ext/xsl/xsltprocessor.c
diff -u php-src/ext/xsl/xsltprocessor.c:1.29.2.3 
php-src/ext/xsl/xsltprocessor.c:1.29.2.4
--- php-src/ext/xsl/xsltprocessor.c:1.29.2.3Tue Aug 10 04:02:00 2004
+++ php-src/ext/xsl/xsltprocessor.c Wed Sep  8 12:54:53 2004
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: xsltprocessor.c,v 1.29.2.3 2004/08/10 08:02:00 chregu Exp $ */
+/* $Id: xsltprocessor.c,v 1.29.2.4 2004/09/08 16:54:53 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -27,9 +27,6 @@
 #include php_xsl.h
 #include ext/libxml/php_libxml.h
 
-static void xsl_ext_function_string_php(xmlXPathParserContextPtr ctxt, int nargs);
-static void xsl_ext_function_object_php(xmlXPathParserContextPtr ctxt, int nargs);
-
 /*
 * class xsl_xsltprocessor 
 *
@@ -76,13 +73,6 @@
return (char *) value;
 }
 
-static void php_xsl_unregister_php_functions() {
-   xsltUnregisterExtModuleFunction ((const xmlChar *) functionString,
-  (const xmlChar *) http://php.net/xsl;);
-   xsltUnregisterExtModuleFunction ((const xmlChar *) function,
-  (const xmlChar *) http://php.net/xsl;);
-}
-
 
 /* {{{ php_xsl_xslt_make_params()
Translates a PHP array to a libxslt parameters array */
@@ -139,6 +129,7 @@
zval **args;
zval *retval;
int result, i, ret;
+   int error = 0;
zend_fcall_info fci;
zval handler;
xmlXPathObjectPtr obj;
@@ -148,17 +139,43 @@

TSRMLS_FETCH();
 
+   if (! zend_is_executing(TSRMLS_C)) {
+   xsltGenericError(xsltGenericErrorContext,
+   

Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard http_fopen_wrapper.c

2004-09-08 Thread Sara Golemon
 This morning I've started testing this new feature and I've found some
bugs:
  * it is segfaulting on redirects

I'll just bet I know why too

The way the http:// wrapper is built, any redirects would be prone to
stacking multiple filters on top of each other.  There's two things to
address here:

(A) Why would the redirect indicate chunked encoding during a redirect?
Better check for redirects and clear the autofilter flag in that case.

(B) Why would multiply stacked filters segfault? Based on an earlier issue I
had with zlib_filter I suspect this may relate to the handling of
PSFS_ERR_FATAL (issued by the second itteration of http.chunked.decode
because there's no chunksize to parse) in the filters api and isn't really a
problem with chunked decoding per se.  Your GDB and Valgrind output also
seem to support that theory.

  * the chunk decoding algorithm isn't working well. Just run a diff in thw
 output of both HTTP/1.0 and 1.1.

That's interresting because the tests I ran got identical outputs both with
and without chunked encode/decode.  I didn't try google.com though, I'll
give them a shot after I've addressed the larger issues.

Sacha-

  I can appreciate that there is a limited potential need for PHP to support
chunked encoding right-now, however this is one step in a larger process
to support keep-alives and issuing multiple requests over a single
http/https session.  I'd like to work on the issues raised by Nuno: (A)
being minor, and (B) being (seemingly) unrelated to chunked-encoding itself.
If the release cycle starts to approach and we're no better off then
obviously this can and should be torn out in the name of stability.

-Sara

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard http_fopen_wrapper.c

2004-09-08 Thread Sterling Hughes
Sascha Schumann wrote:
HTTP/1.1 supports compressing, which is good to save bandwidth.

As does HTTP/1.0.  Refer to RFC 1945, section 3.5 Content
Codings.
As the code is only in HEAD, there is no real problem, because untill 
PHP 5.1 goes out, I'll test this extensively :)

That is quite optimistic.
If someone needs HTTP/1.1 support, he can use curl, or call
wget, or whatever.  There is no reason we would need to add
this feature to PHP's standard set of features.

Yep.
-Sterling
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-CVS] cvs: php-src /main/streams streams.c

2004-09-08 Thread Sara Golemon
pollita Wed Sep  8 14:42:15 2004 EDT

  Modified files:  
/php-src/main/streams   streams.c 
  Log:
  Handle maxlen when stream can't be mmaped
  
http://cvs.php.net/diff.php/php-src/main/streams/streams.c?r1=1.62r2=1.63ty=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.62 php-src/main/streams/streams.c:1.63
--- php-src/main/streams/streams.c:1.62 Tue Aug 31 07:37:02 2004
+++ php-src/main/streams/streams.c  Wed Sep  8 14:42:15 2004
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: streams.c,v 1.62 2004/08/31 11:37:02 tony2001 Exp $ */
+/* $Id: streams.c,v 1.63 2004/09/08 18:42:15 pollita Exp $ */
 
 #define _GNU_SOURCE
 #include php.h
@@ -1209,6 +1209,17 @@
 
return mapped;
}
+   }
+
+   if (maxlen  0) {
+   ptr = *buf = pemalloc_rel_orig(maxlen + 1, persistent);
+   while ((len  maxlen)  !php_stream_eof(src)) {
+   ret = php_stream_read(src, ptr, maxlen - len);
+   len += ret;
+   ptr += ret;
+   }
+   *ptr = '\0';
+   return len;
}
 
/* avoid many reallocs by allocating a good sized chunk to begin with, if

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-CVS] cvs: php-src(PHP_5_0) /ext/soap php_encoding.c

2004-09-08 Thread Derick Rethans
On Wed, 8 Sep 2004, Andi Gutmans wrote:

 OK, so please #if it with libxml2 version number once it is clear what the
 next version is.

Rob already did this in the core libxml stuff, he made a macro that
redirects everything to our own copy of the function.

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_0) /main/streams streams.c

2004-09-08 Thread Sara Golemon
pollita Wed Sep  8 14:45:05 2004 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/main/streams   streams.c 
  Log:
  MFH (r.163) Handle maxlen when stream can't be mmaped
  
http://cvs.php.net/diff.php/php-src/main/streams/streams.c?r1=1.61.2.1r2=1.61.2.2ty=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.61.2.1 php-src/main/streams/streams.c:1.61.2.2
--- php-src/main/streams/streams.c:1.61.2.1 Tue Aug 31 07:38:59 2004
+++ php-src/main/streams/streams.c  Wed Sep  8 14:45:05 2004
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: streams.c,v 1.61.2.1 2004/08/31 11:38:59 tony2001 Exp $ */
+/* $Id: streams.c,v 1.61.2.2 2004/09/08 18:45:05 pollita Exp $ */
 
 #define _GNU_SOURCE
 #include php.h
@@ -1209,6 +1209,17 @@
 
return mapped;
}
+   }
+
+   if (maxlen  0) {
+   ptr = *buf = pemalloc_rel_orig(maxlen + 1, persistent);
+   while ((len  maxlen)  !php_stream_eof(src)) {
+   ret = php_stream_read(src, ptr, maxlen - len);
+   len += ret;
+   ptr += ret;
+   }
+   *ptr = '\0';
+   return len;
}
 
/* avoid many reallocs by allocating a good sized chunk to begin with, if

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard http_fopen_wrapper.c

2004-09-08 Thread Sterling Hughes
 Sacha-
 
   I can appreciate that there is a limited potential need for PHP to support
 chunked encoding right-now, however this is one step in a larger process
 to support keep-alives and issuing multiple requests over a single
 http/https session.  I'd like to work on the issues raised by Nuno: (A)
 being minor, and (B) being (seemingly) unrelated to chunked-encoding itself.
 If the release cycle starts to approach and we're no better off then
 obviously this can and should be torn out in the name of stability.

The reason I'm against these changes is that simple HTTP support is
fine, but when it comes to getting more complex support written by PHP
it makes very little sense to me to not use some external library
(e.g. cURL).  Supporting these features properly, completely, with
multiple browsers is too large a code size to duplicate within PHP
itself, simple support is one thing, but I think its wrong to get more
advanced in this respect.

_Sterling

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard http_fopen_wrapper.c

2004-09-08 Thread Sascha Schumann
 I can appreciate that there is a limited potential need for PHP to support
chunked encoding right-now, however this is one step in a larger process
I suggest you complete the larger process of cloning curl and
resubmit your stable changes then for review.
- Sascha
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard http_fopen_wrapper.c

2004-09-08 Thread Marcus Boerger
Hello Sascha,

Wednesday, September 8, 2004, 9:34:51 PM, you wrote:

  I can appreciate that there is a limited potential need for PHP to support
 chunked encoding right-now, however this is one step in a larger process

  I suggest you complete the larger process of cloning curl and
  resubmit your stable changes then for review.

Doesn't that scream like reverting the changes and doingthem in a new PECL
extension instead?

best regards
marcus

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard http_fopen_wrapper.c

2004-09-08 Thread Andi Gutmans
Yep I concur. No need to bloat the code base for no good reason.
Whoever needs the flexibility you are talking of can use CURL.
Andi
At 12:29 PM 9/8/2004 -0700, Sterling Hughes wrote:
 Sacha-

   I can appreciate that there is a limited potential need for PHP to 
support
 chunked encoding right-now, however this is one step in a larger process
 to support keep-alives and issuing multiple requests over a single
 http/https session.  I'd like to work on the issues raised by Nuno: (A)
 being minor, and (B) being (seemingly) unrelated to chunked-encoding 
itself.
 If the release cycle starts to approach and we're no better off then
 obviously this can and should be torn out in the name of stability.

The reason I'm against these changes is that simple HTTP support is
fine, but when it comes to getting more complex support written by PHP
it makes very little sense to me to not use some external library
(e.g. cURL).  Supporting these features properly, completely, with
multiple browsers is too large a code size to duplicate within PHP
itself, simple support is one thing, but I think its wrong to get more
advanced in this respect.
_Sterling
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard http_fopen_wrapper.c

2004-09-08 Thread Rasmus Lerdorf
Why not integrate libcurl more intimately?  I can see Sara's point in
wanting to be able to pipeline http streams, but re-inventing the wheel
doesn't seem like a good idea either.  Get the streams code to use the
appropriate features in libcurl, if present.  We should be able to solve
the problem without writing all this duplicate code.

-Rasmus

On Wed, 8 Sep 2004, Andi Gutmans wrote:

 Yep I concur. No need to bloat the code base for no good reason.
 Whoever needs the flexibility you are talking of can use CURL.

 Andi

 At 12:29 PM 9/8/2004 -0700, Sterling Hughes wrote:
   Sacha-
  
 I can appreciate that there is a limited potential need for PHP to
  support
   chunked encoding right-now, however this is one step in a larger process
   to support keep-alives and issuing multiple requests over a single
   http/https session.  I'd like to work on the issues raised by Nuno: (A)
   being minor, and (B) being (seemingly) unrelated to chunked-encoding
  itself.
   If the release cycle starts to approach and we're no better off then
   obviously this can and should be torn out in the name of stability.
 
 The reason I'm against these changes is that simple HTTP support is
 fine, but when it comes to getting more complex support written by PHP
 it makes very little sense to me to not use some external library
 (e.g. cURL).  Supporting these features properly, completely, with
 multiple browsers is too large a code size to duplicate within PHP
 itself, simple support is one thing, but I think its wrong to get more
 advanced in this respect.
 
 _Sterling
 
 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard http_fopen_wrapper.c

2004-09-08 Thread Adam Maccabee Trachtenberg
On Wed, 8 Sep 2004, Andi Gutmans wrote:

 Yep I concur. No need to bloat the code base for no good reason.
 Whoever needs the flexibility you are talking of can use CURL.

Maybe another alternative would be to revive the cURL wrappers
project? That would give us the benefits of being able to leverage the
power of cURL from within streams without needing to duplicate code.

-adam

-- 
[EMAIL PROTECTED]
author of o'reilly's upgrading to php 5 and php cookbook
avoid the holiday rush, buy your copies today!

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard http_fopen_wrapper.c

2004-09-08 Thread Sara Golemon
pollita Wed Sep  8 19:37:55 2004 EDT

  Modified files:  
/php-src/ext/standard   http_fopen_wrapper.c 
  Log:
  
  http://cvs.php.net/diff.php/php-src/ext/standard/http_fopen_wrapper.c?r1=1.91r2=1.92ty=u
Index: php-src/ext/standard/http_fopen_wrapper.c
diff -u php-src/ext/standard/http_fopen_wrapper.c:1.91 
php-src/ext/standard/http_fopen_wrapper.c:1.92
--- php-src/ext/standard/http_fopen_wrapper.c:1.91  Tue Sep  7 18:46:24 2004
+++ php-src/ext/standard/http_fopen_wrapper.c   Wed Sep  8 19:37:55 2004
@@ -19,7 +19,7 @@
|  Sara Golemon [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: http_fopen_wrapper.c,v 1.91 2004/09/07 22:46:24 pollita Exp $ */ 
+/* $Id: http_fopen_wrapper.c,v 1.92 2004/09/08 23:37:55 pollita Exp $ */ 
 
 #include php.h
 #include php_globals.h
@@ -89,183 +89,6 @@
 #define HTTP_HEADER_CONTENT_LENGTH 16
 #define HTTP_HEADER_TYPE   32
 
-/* 8 hexits plus \r\n\0 */
-#define HTTP_CHUNK_SIZE_MAXLEN 11
-#define HTTP_CHUNKED_ENCODING_BUFFER_LEN   (HTTP_CHUNK_SIZE_MAXLEN + 1)
-
-typedef struct _php_http_chunked_encoding_data {
-   int is_persistent;
-   size_t chunk_remaining;
-   char chunksize_buffer[HTTP_CHUNKED_ENCODING_BUFFER_LEN];
-   char *chunksize_buffer_pos;
-} php_http_chunked_encoding_data;
-
-static php_stream_filter_status_t php_http_chunked_encoding_filter(
-php_stream *stream,
-php_stream_filter *thisfilter,
-php_stream_bucket_brigade *buckets_in,
-php_stream_bucket_brigade *buckets_out,
-size_t *bytes_consumed,
-int flags
-TSRMLS_DC)
-{
-   php_stream_bucket *bucket;
-   php_http_chunked_encoding_data *data = 
(php_http_chunked_encoding_data*)thisfilter-abstract;
-   size_t consumed = 0;
-   char *buf;
-   size_t buflen;
-
-   while (buckets_in-head) {
-   char *e = NULL;
-   size_t chunk_remaining;
-
-   bucket = buckets_in-head;
-   php_stream_bucket_unlink(bucket TSRMLS_CC);
-
-   buf = bucket-buf;
-   buflen = bucket-buflen;
-
-continue_bucket:
-
-   if (data-chunk_remaining  0) {
-   if ((data-chunk_remaining  buflen)  (bucket-buf == buf)) {
-   /* This bucket is smaller than our remaining chunksize,
-  Pass it on unmolested */
-   consumed += buflen;
-   data-chunk_remaining -= buflen;
-   php_stream_bucket_append(buckets_out, bucket 
TSRMLS_CC);
-
-   /* Next bucket please */
-   continue;
-   } else if (data-chunk_remaining  buflen) {
-   php_stream_bucket *newbucket;
-   char *newbuf;
-
-   /* Previously split bucket can be used en toto */
-   consumed += buflen;
-   data-chunk_remaining -= buflen;
-
-   newbuf = estrndup(buf, buflen);
-   newbucket = php_stream_bucket_new(stream, newbuf, 
buflen, 1, stream-is_persistent TSRMLS_CC);
-   php_stream_bucket_append(buckets_out, newbucket 
TSRMLS_CC);
-   php_stream_bucket_delref(bucket TSRMLS_CC);
-   /* Next bucket please */
-   continue;
-   } else {
-   php_stream_bucket *newbucket;
-   char *newbuf;
-
-   /* Consume enough of this bucket to satisfy the 
current chunk */
-   newbuf = pemalloc(data-chunk_remaining, 
stream-is_persistent);
-   memcpy(newbuf, buf, data-chunk_remaining);
-
-   newbucket = php_stream_bucket_new(stream, newbuf, 
data-chunk_remaining, 1, stream-is_persistent TSRMLS_CC);
-   php_stream_bucket_append(buckets_out, newbucket 
TSRMLS_CC);
-   buf += data-chunk_remaining;
-   buflen -= data-chunk_remaining;
-   consumed += data-chunk_remaining;
-   data-chunk_remaining = 0;
-   /* Fall Through */
-   }
-   }
-
-   while (buflen  0  (*buf == '\r' || *buf == '\n')) {
-   buf++;
-   buflen--;
-   }
-
-   if (buflen = 0) {
-   php_stream_bucket_delref(bucket TSRMLS_CC);
-   continue;
-   }
-
-   if