Test: /ext/curl/tests/bug80595.phpt - Version 7.4.25        

Bug #80595 Resetting POSTFIELDS to empty array breaks request
Submitted: 2021-01-06 00:25:18 Modified: 2021-01-11 16:11:02
From: dav.tur19 Assigned: cmb
Status: Closed Package: cURL related
PHP Version: 7.4 OS: *

There are 2 different diffs reported by users for this test.

Count Diff
1 (50%)
001+ string(3321) "<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 002+ <html><head> 003+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 004+ <title>ERROR: The requested URL could not be retrieved</title> 005+ <style type="text/css"><!-- 006+ /* 007+ Stylesheet for Squid Error pages 008+ Adapted from design by Free CSS Templates 009+ http://www.freecsstemplates.org 010+ Released for free under a Creative Commons Attribution 2.5 License 011+ */ 012+ 013+ /* Page basics */ 014+ * { 015+ font-family: verdana, sans-serif; 001- string(43) "array(1) { 002- ["foo"]=> 003- string(3) "bar" 004- } 005- " 006- string(13) "array(0) { 008- " 017+ 018+ html body { 019+ margin: 0; 020+ padding: 0; 021+ background: #efefef; 022+ font-size: 12px; 023+ color: #1e1e1e; 024+ } 025+ 026+ /* Page displayed title area */ 027+ #titles { 028+ margin-left: 15px; 029+ padding: 10px; 030+ padding-left: 100px; 031+ background: url('http://www.squid-cache.org/Artwork/SN.png') no-repeat left; 032+ } 033+ 034+ /* initial title */ 035+ #titles h1 { 036+ color: #000000; 037+ } 038+ #titles h2 { 039+ color: #000000; 040+ } 041+ 042+ /* special event: FTP success page titles */ 043+ #titles ftpsuccess { 044+ background-color:#00ff00; 045+ width:100%; 046+ } 047+ 048+ /* Page displayed body content area */ 049+ #content { 050+ padding: 10px; 051+ background: #ffffff; 052+ } 053+ 054+ /* General text */ 055+ p { 056+ } 057+ 058+ /* error brief description */ 059+ #error p { 060+ } 061+ 062+ /* some data which may have caused the problem */ 063+ #data { 064+ } 065+ 066+ /* the error message received from the system or other software */ 067+ #sysmsg { 068+ } 069+ 070+ pre { 071+ font-family:sans-serif; 072+ } 073+ 074+ /* special event: FTP / Gopher directory listing */ 075+ #dirmsg { 076+ font-family: courier; 077+ color: black; 078+ font-size: 10pt; 079+ } 080+ #dirlisting { 081+ margin-left: 2%; 082+ margin-right: 2%; 083+ } 084+ #dirlisting tr.entry td.icon,td.filename,td.size,td.date { 085+ border-bottom: groove; 086+ } 087+ #dirlisting td.size { 088+ width: 50px; 089+ text-align: right; 090+ padding-right: 5px; 091+ } 092+ 093+ /* horizontal lines */ 094+ hr { 095+ margin: 0; 096+ } 097+ 098+ /* page displayed footer area */ 099+ #footer { 100+ font-size: 9px; 101+ padding-left: 10px; 102+ } 103+ 104+ 105+ body 106+ :lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; } 107+ :lang(he) { direction: rtl; float: right; } 108+ --></style> 109+ </head><body> 110+ <div id="titles"> 111+ <h1>ERROR</h1> 112+ <h2>The requested URL could not be retrieved</h2> 113+ </div> 114+ <hr> 115+ 116+ <div id="content"> 117+ <p>The following error was encountered while trying to retrieve the URL: <a href="http://localhost:8964/get.inc?">http://localhost:8964/get.inc?</a></p> 118+ 119+ <blockquote id="error"> 120+ <p><b>Access Denied.</b></p> 121+ </blockquote> 122+ 123+ <p>Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.</p> 124+ 125+ <p>Your cache administrator is <a href="mailto:hongze@staff.sina.com.cn?subject=CacheErrorInfo%20-%20ERR_ACCESS_DENIED&amp;body=CacheHost%3A%2010.81.254.59%0D%0AErrPage%3A%20ERR_ACCESS_DENIED%0D%0AErr%3A%20%5Bnone%5D%0D%0ATimeStamp%3A%20Tue,%2009%20Nov%202021%2003%3A16%3A48%20GMT%0D%0A%0D%0AClientIP%3A%2010.235.61.14%0D%0A%0D%0AHTTP%20Request%3A%0D%0APOST%20%2Fget.inc%3Ftest%3Dpost%20HTTP%2F1.1%0AHost%3A%20localhost%3A8964%0D%0AAccept%3A%20*%2F*%0D%0AProxy-Connection%3A%20Keep-Alive%0D%0AContent-Length%3A%20141%0D%0AContent-Type%3A%20multipart%2Fform-data%3B%20boundary%3D------------------------02a6654b120812db%0D%0A%0D%0A%0D%0A">hongze@staff.sina.com.cn</a>.</p> 126+ <br> 127+ </div> 128+ 129+ <hr> 130+ <div id="footer"> 131+ <p>Generated Tue, 09 Nov 2021 03:16:48 GMT by 10.81.254.59 (squid/3.1.10)</p> 132+ <!-- ERR_ACCESS_DENIED --> 133+ </div> 134+ </body></html> 135+ " 136+ string(3276) "<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 137+ <html><head> 138+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 139+ <title>ERROR: The requested URL could not be retrieved</title> 140+ <style type="text/css"><!-- 141+ /* 142+ Stylesheet for Squid Error pages 143+ Adapted from design by Free CSS Templates 144+ http://www.freecsstemplates.org 145+ Released for free under a Creative Commons Attribution 2.5 License 146+ */ 147+ 148+ /* Page basics */ 149+ * { 150+ font-family: verdana, sans-serif; 151+ } 152+ 153+ html body { 154+ margin: 0; 155+ padding: 0; 156+ background: #efefef; 157+ font-size: 12px; 158+ color: #1e1e1e; 159+ } 160+ 161+ /* Page displayed title area */ 162+ #titles { 163+ margin-left: 15px; 164+ padding: 10px; 165+ padding-left: 100px; 166+ background: url('http://www.squid-cache.org/Artwork/SN.png') no-repeat left; 167+ } 168+ 169+ /* initial title */ 170+ #titles h1 { 171+ color: #000000; 172+ } 173+ #titles h2 { 174+ color: #000000; 175+ } 176+ 177+ /* special event: FTP success page titles */ 178+ #titles ftpsuccess { 179+ background-color:#00ff00; 180+ width:100%; 181+ } 182+ 183+ /* Page displayed body content area */ 184+ #content { 185+ padding: 10px; 186+ background: #ffffff; 187+ } 188+ 189+ /* General text */ 190+ p { 191+ } 192+ 193+ /* error brief description */ 194+ #error p { 195+ } 196+ 197+ /* some data which may have caused the problem */ 198+ #data { 199+ } 200+ 201+ /* the error message received from the system or other software */ 202+ #sysmsg { 203+ } 204+ 205+ pre { 206+ font-family:sans-serif; 207+ } 208+ 209+ /* special event: FTP / Gopher directory listing */ 210+ #dirmsg { 211+ font-family: courier; 212+ color: black; 213+ font-size: 10pt; 214+ } 215+ #dirlisting { 216+ margin-left: 2%; 217+ margin-right: 2%; 218+ } 219+ #dirlisting tr.entry td.icon,td.filename,td.size,td.date { 220+ border-bottom: groove; 221+ } 222+ #dirlisting td.size { 223+ width: 50px; 224+ text-align: right; 225+ padding-right: 5px; 226+ } 227+ 228+ /* horizontal lines */ 229+ hr { 230+ margin: 0; 231+ } 232+ 233+ /* page displayed footer area */ 234+ #footer { 235+ font-size: 9px; 236+ padding-left: 10px; 237+ } 238+ 239+ 240+ body 241+ :lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; } 242+ :lang(he) { direction: rtl; float: right; } 243+ --></style> 244+ </head><body> 245+ <div id="titles"> 246+ <h1>ERROR</h1> 247+ <h2>The requested URL could not be retrieved</h2> 248+ </div> 249+ <hr> 250+ 251+ <div id="content"> 252+ <p>The following error was encountered while trying to retrieve the URL: <a href="http://localhost:8964/get.inc?">http://localhost:8964/get.inc?</a></p> 253+ 254+ <blockquote id="error"> 255+ <p><b>Access Denied.</b></p> 256+ </blockquote> 257+ 258+ <p>Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.</p> 259+ 260+ <p>Your cache administrator is <a href="mailto:hongze@staff.sina.com.cn?subject=CacheErrorInfo%20-%20ERR_ACCESS_DENIED&amp;body=CacheHost%3A%2010.81.254.59%0D%0AErrPage%3A%20ERR_ACCESS_DENIED%0D%0AErr%3A%20%5Bnone%5D%0D%0ATimeStamp%3A%20Tue,%2009%20Nov%202021%2003%3A16%3A48%20GMT%0D%0A%0D%0AClientIP%3A%2010.235.61.14%0D%0A%0D%0AHTTP%20Request%3A%0D%0APOST%20%2Fget.inc%3Ftest%3Dpost%20HTTP%2F1.0%0AHost%3A%20localhost%3A8964%0D%0AAccept%3A%20*%2F*%0D%0AProxy-Connection%3A%20Keep-Alive%0D%0AContent-Length%3A%200%0D%0AContent-Type%3A%20application%2Fx-www-form-urlencoded%0D%0A%0D%0A%0D%0A">hongze@staff.sina.com.cn</a>.</p> 261+ <br> 262+ </div> 263+ 264+ <hr> 265+ <div id="footer"> 266+ <p>Generated Tue, 09 Nov 2021 03:16:48 GMT by 10.81.254.59 (squid/3.1.10)</p> 267+ <!-- ERR_ACCESS_DENIED --> 268+ </div> 269+ </body></html> 270+ "
1 (50%)
001+ bool(false) 002+ bool(false) 001- string(43) "array(1) { 002- ["foo"]=> 003- string(3) "bar" 004- } 005- " 006- string(13) "array(0) { 007- } 008- "