From: vitaliy dot okulov at gmail dot com Operating system: Linux PHP version: 4.4.0 PHP Bug Type: Apache related Bug description: chunked Transfer-Encoding forbidden
Description: ------------ Hi all. I think i found some little bug. 1 of my client use midlet program to comunicate with some php script at my server by POST method. Reproduce code: --------------- This Java program connect to my Apache 1.3.33 web server & get 411 error. In my logs I get "chunked Transfer-Encoding forbidden" & thats all. When i dump tcp packets to 80 port from IP of my client i see that there is no Content-Length field in request. Thats why, i think, my client get 411 error. But the same php script & java client program perfectly work at apache 2.0.50 server. There is phpinfo from my server: http://mms2u.ru/a.php And from my client ex-server: http://mms2you.ru/a.php Also i try to test same java program at my homebox. With default apache 2.0.54 there is no problem and with apache 1.3.33 problem still exist. There is acess & error logs: my test homebox apache 2.0.54 server: 10.0.15.8 - - [01/Sep/2005:02:08:30 +0400] "POST http://test/chat/index.php HTTP/1.1" 200 35536 "-" "Chat Reader 0.38" my test homebox apache 1.3.33 server: [Thu Sep 01 01:53:02 2005] [error] [client 10.0.15.8] chunked Transfer-Encoding forbidden: /chat/index.php 10.0.15.8 - - [01/Sep/2005:01:53:02 +0400] "POST http://test/chat/index.php HTTP/1.1" 411 357 There is dump of request to apache 1.3.33 server: 12:04:42.683077 IP 82.204.131.186.1076 > 83.222.15.195.http: S 4171925538: 4171925538(0) win 65535 <mss 1460,nop,nop,sackOK> 0x0000: 4500 0030 04ae 4000 7606 c5f2 52cc 83ba [EMAIL PROTECTED] 0x0010: 53de 0fc3 0434 0050 f8aa 8822 0000 0000 S....4.P...".... 0x0020: 7002 ffff c3a6 0000 0204 05b4 0101 0402 p............... 12:04:42.683260 IP 83.222.15.195.http > 82.204.131.186.1076: S 1224834130: 1224834130(0) ack 4171925539 win 5840 <mss 1460,nop,nop,sackOK> 0x0000: 4500 0030 0000 4000 4006 00a1 53de 0fc3 [EMAIL PROTECTED]@...S... 0x0010: 52cc 83ba 0050 0434 4901 7c52 f8aa 8823 R....P.4I.|R...# 0x0020: 7012 16d0 e771 0000 0204 05b4 0101 0402 p....q.......... 12:04:42.706476 IP 82.204.131.186.1076 > 83.222.15.195.http: . ack 1 win 65535 0x0000: 4500 0028 04af 4000 7606 c5f9 52cc 83ba E..([EMAIL PROTECTED] 0x0010: 53de 0fc3 0434 0050 f8aa 8823 4901 7c53 S....4.P...#I.|S 0x0020: 5010 ffff 2b06 0000 0000 0000 0000 P...+......... 12:04:42.713347 IP 82.204.131.186.1076 > 83.222.15.195.http: P 1:285(284) ack 1 win 65535 0x0000: 4500 0144 04b0 4000 7606 c4dc 52cc 83ba [EMAIL PROTECTED] 0x0010: 53de 0fc3 0434 0050 f8aa 8823 4901 7c53 S....4.P...#I.|S 0x0020: 5018 ffff 8bcd 0000 504f 5354 2068 7474 P.......POST.htt 0x0030: 703a 2f2f 6d6d 7332 752e 7275 2f63 6861 p://mms2u.ru/cha 0x0040: 742f 696e 6465 782e 7068 7020 4854 5450 t/index.php.HTTP 0x0050: 2f31 2e31 0d0a 486f 7374 3a6d 6d73 3275 /1.1..Host:mms2u 0x0060: 2e72 750d 0a43 6f6e 6e65 6374 696f 6e3a .ru..Connection: 0x0070: 636c 6f73 650d 0a43 6f6e 7465 6e74 2d54 close..Content-T 0x0080: 7970 653a 7465 7874 2f68 746d 6c3b 2063 ype:text/html;.c 0x0090: 6861 7273 6574 3d77 696e 646f 7773 2d31 harset=windows-1 0x00a0: 3235 310d 0a55 7365 722d 4167 656e 743a 251..User-Agent: 0x00b0: 4368 6174 2052 6561 6465 7220 302e 3338 Chat.Reader.0.38 0x00c0: 0d0a 4361 6368 652d 436f 6e74 726f 6c3a ..Cache-Control: 0x00d0: 6e6f 2d63 6163 6865 0d0a 7472 616e 7366 no-cache..transf 0x00e0: 6572 2d65 6e63 6f64 696e 673a 6368 756e er-encoding:chun 0x00f0: 6b65 640d 0a0d 0a34 370d 0a6d 6964 6c65 ked....47..midle 0x0100: 743d 302e 3338 266d 6f64 653d 3126 7573 t=0.38&mode=1&us 0x0110: 6572 6e61 6d65 3d64 656d 6f26 7061 7373 ername=demo&pass 0x0120: 776f 7264 3d64 656d 6f26 706d 5f61 6c6c word=demo&pm_all 0x0130: 3d31 266c 613d 3126 706d 3d31 2675 6f6c =1&la=1&pm=1&uol 0x0140: 3d31 0d0a =1.. 12:04:42.713390 IP 83.222.15.195.http > 82.204.131.186.1076: . ack 285 win 6432 0x0000: 4500 0028 12ae 4000 4006 edfa 53de 0fc3 E..([EMAIL PROTECTED]@...S... 0x0010: 52cc 83ba 0050 0434 4901 7c53 f8aa 893f R....P.4I.|S...? 0x0020: 5010 1920 10ca 0000 P....... 12:04:42.714023 IP 83.222.15.195.http > 82.204.131.186.1076: P 1:474(473) ack 285 win 6432 0x0000: 4500 0201 12b0 4000 4006 ec1f 53de 0fc3 [EMAIL PROTECTED]@...S... 0x0010: 52cc 83ba 0050 0434 4901 7c53 f8aa 893f R....P.4I.|S...? 0x0020: 5018 1920 c41e 0000 4854 5450 2f31 2e31 P.......HTTP/1.1 0x0030: 2034 3131 204c 656e 6774 6820 5265 7175 .411.Length.Requ 0x0040: 6972 6564 0d0a 4461 7465 3a20 5468 752c ired..Date:.Thu, 0x0050: 2030 3120 5365 7020 3230 3035 2030 383a .01.Sep.2005.08: 0x0060: 3034 3a34 3220 474d 540d 0a53 6572 7665 04:42.GMT..Serve 0x0070: 723a 2041 7061 6368 650d 0a43 6f6e 6e65 r:.Apache..Conne 0x0080: 6374 696f 6e3a 2063 6c6f 7365 0d0a 5472 ction:.close..Tr 0x0090: 616e 7366 6572 2d45 6e63 6f64 696e 673a ansfer-Encoding: 0x00a0: 2063 6875 6e6b 6564 0d0a 436f 6e74 656e .chunked..Conten 0x00b0: 742d 5479 7065 3a20 7465 7874 2f68 746d t-Type:.text/htm 0x00c0: 6c3b 2063 6861 7273 6574 3d69 736f 2d38 l;.charset=iso-8 0x00d0: 3835 392d 310d 0a0d 0a31 3163 0d0a 3c21 859-1....11c..<! 0x00e0: 444f 4354 5950 4520 4854 4d4c 2050 5542 DOCTYPE.HTML.PUB 0x00f0: 4c49 4320 222d 2f2f 4945 5446 2f2f 4454 LIC."-//IETF//DT 0x0100: 4420 4854 4d4c 2032 2e30 2f2f 454e 223e D.HTML.2.0//EN"> 0x0110: 0a3c 4854 4d4c 3e3c 4845 4144 3e0a 3c54 .<HTML><HEAD>.<T 0x0120: 4954 4c45 3e34 3131 204c 656e 6774 6820 ITLE>411.Length. 0x0130: 5265 7175 6972 6564 3c2f 5449 544c 453e Required</TITLE> 0x0140: 0a3c 2f48 4541 443e 3c42 4f44 593e 0a3c .</HEAD><BODY>.< 0x0150: 4831 3e4c 656e 6774 6820 5265 7175 6972 H1>Length.Requir 0x0160: 6564 3c2f 4831 3e0a 4120 7265 7175 6573 ed</H1>.A.reques 0x0170: 7420 6f66 2074 6865 2072 6571 7565 7374 t.of.the.request 0x0180: 6564 206d 6574 686f 6420 504f 5354 2072 ed.method.POST.r 0x0190: 6571 7569 7265 7320 6120 7661 6c69 6420 equires.a.valid. 0x01a0: 436f 6e74 656e 742d 6c65 6e67 7468 2e3c Content-length.< 0x01b0: 503e 0a63 6875 6e6b 6564 2054 7261 6e73 P>.chunked.Trans 0x01c0: 6665 722d 456e 636f 6469 6e67 2066 6f72 fer-Encoding.for 0x01d0: 6269 6464 656e 3a20 2f63 6861 742f 696e bidden:./chat/in 0x01e0: 6465 782e 7068 703c 503e 0a3c 2f42 4f44 dex.php<P>.</BOD 0x01f0: 593e 3c2f 4854 4d4c 3e0a 0d0a 300d 0a0d Y></HTML>...0... 0x0200: 0a . 12:04:42.714106 IP 83.222.15.195.http > 82.204.131.186.1076: F 474:474(0) ack 285 win 6432 0x0000: 4500 0028 12b2 4000 4006 edf6 53de 0fc3 E..([EMAIL PROTECTED]@...S... 0x0010: 52cc 83ba 0050 0434 4901 7e2c f8aa 893f R....P.4I.~,...? 0x0020: 5011 1920 0ef0 0000 P....... 12:04:42.738956 IP 82.204.131.186.1076 > 83.222.15.195.http: P 285:290(5) ack 1 win 65535 0x0000: 4500 002d 04b2 4000 7606 c5f1 52cc 83ba [EMAIL PROTECTED] 0x0010: 53de 0fc3 0434 0050 f8aa 893f 4901 7c53 S....4.P...?I.|S 0x0020: 5018 ffff e5c2 0000 300d 0a0d 0a00 P.......0..... 12:04:42.740955 IP 82.204.131.186.1076 > 83.222.15.195.http: . ack 475 win 65062 0x0000: 4500 0028 04b3 4000 7606 c5f5 52cc 83ba E..([EMAIL PROTECTED] 0x0010: 53de 0fc3 0434 0050 f8aa 8944 4901 7e2d S....4.P...DI.~- 0x0020: 5010 fe26 29e4 0000 0000 0000 0000 P..&)......... 12:04:42.779569 IP 83.222.15.195.http > 82.204.131.186.1076: . ack 290 win 6432 0x0000: 4500 0028 12b4 4000 4006 edf4 53de 0fc3 E..([EMAIL PROTECTED]@...S... 0x0010: 52cc 83ba 0050 0434 4901 7e2d f8aa 8944 R....P.4I.~-...D 0x0020: 5010 1920 0eeb 0000 P....... 12:04:49.071098 IP 82.204.131.186.1076 > 83.222.15.195.http: F 290:290(0) ack 475 win 65062 0x0000: 4500 0028 04b8 4000 7606 c5f0 52cc 83ba E..([EMAIL PROTECTED] 0x0010: 53de 0fc3 0434 0050 f8aa 8944 4901 7e2d S....4.P...DI.~- 0x0020: 5011 fe26 29e3 0000 0000 0000 0000 P..&)......... 12:04:49.071131 IP 83.222.15.195.http > 82.204.131.186.1076: . ack 291 win 6432 0x0000: 4500 0028 0cc8 4000 4006 f3e0 53de 0fc3 E..([EMAIL PROTECTED]@...S... 0x0010: 52cc 83ba 0050 0434 4901 7e2d f8aa 8945 R....P.4I.~-...E 0x0020: 5010 1920 0eea 0000 P....... 12 packets captured 15 packets received by filter 0 packets dropped by kernel Also: % telnet www.php.net 80 Trying 64.246.30.37... Connected to rs1.php.net. Escape character is '^]'. POST /submit-event.php HTTP/1.1 Host: www.php.net Transfer-Encoding: chunked HTTP/1.1 411 Length Required Date: Sun, 02 Jan 2005 19:19:35 GMT Server: Apache/1.3.26 (Unix) mod_gzip/1.3.26.1a PHP/4.3.3-dev Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1 11e <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <HTML><HEAD> <TITLE>411 Length Required</TITLE> </HEAD><BODY> <H1>Length Required</H1> A request of the requested method POST requires a valid Content-length.<P> chunked Transfer-Encoding forbidden: /submit-event.php<P> </BODY></HTML> 0 Connection closed by foreign host. And, here's a beauty: % telnet www.microsoft.com 80 Trying 207.46.250.222... Connected to origin2.microsoft.com. Escape character is '^]'. GET / HTTP/1.1 Host: www.microsoft.com Transfer-Encoding: chunked HTTP/1.1 404 Not Found Content-Length: 103 Content-Type: text/html Server: Microsoft-IIS/6.0 Date: Sun, 02 Jan 2005 19:13:28 GMT Connection: close <html><head><title>Error</title></head><body>The system cannot find the file specified. </body></html> -- Edit bug report at http://bugs.php.net/?id=34326&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34326&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34326&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34326&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34326&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34326&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34326&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34326&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34326&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34326&r=support Expected behavior: http://bugs.php.net/fix.php?id=34326&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34326&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34326&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34326&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34326&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34326&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34326&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34326&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34326&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34326&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34326&r=mysqlcfg