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

Feature/Change Request #27023 CURL: CURLOPT_POSTFIELDS does not parse content types for files
Submitted: 2004-01-23 13:26:19 Modified: 2011-12-07 16:36:47
From: brianl Assigned: pierrick
Status: Closed Package: cURL related
PHP Version: * OS: *

There is 1 diff reported by users for this test.

Count Diff
1 (100%)
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> 001- string(%d) "curl_testdata1.txt|application/octet-stream|6" 002- string(%d) "curl_testdata1.txt|text/plain|6" 003- string(%d) "foo.txt|application/octet-stream|6" 004- string(%d) "foo.txt|text/plain|6" 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; 016+ } 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%3A15%3A58%20GMT%0D%0A%0D%0AClientIP%3A%2010.235.61.14%0D%0A%0D%0AHTTP%20Request%3A%0D%0APOST%20%2Fget.inc%3Ftest%3Dfile%20HTTP%2F1.1%0AHost%3A%20localhost%3A8964%0D%0AAccept%3A%20*%2F*%0D%0AProxy-Connection%3A%20Keep-Alive%0D%0AContent-Length%3A%20266%0D%0AContent-Type%3A%20multipart%2Fform-data%3B%20boundary%3D------------------------a6815fdcb50544ad%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:15:58 GMT by 10.81.254.59 (squid/3.1.10)</p> 132+ <!-- ERR_ACCESS_DENIED --> 133+ </div> 134+ </body></html> 135+ " 136+ string(3321) "<!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%3A15%3A58%20GMT%0D%0A%0D%0AClientIP%3A%2010.235.61.14%0D%0A%0D%0AHTTP%20Request%3A%0D%0APOST%20%2Fget.inc%3Ftest%3Dfile%20HTTP%2F1.0%0AHost%3A%20localhost%3A8964%0D%0AAccept%3A%20*%2F*%0D%0AProxy-Connection%3A%20Keep-Alive%0D%0AContent-Length%3A%20252%0D%0AContent-Type%3A%20multipart%2Fform-data%3B%20boundary%3D------------------------759971315b005e5a%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:15:58 GMT by 10.81.254.59 (squid/3.1.10)</p> 267+ <!-- ERR_ACCESS_DENIED --> 268+ </div> 269+ </body></html> 270+ " 271+ string(3321) "<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 272+ <html><head> 273+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 274+ <title>ERROR: The requested URL could not be retrieved</title> 275+ <style type="text/css"><!-- 276+ /* 277+ Stylesheet for Squid Error pages 278+ Adapted from design by Free CSS Templates 279+ http://www.freecsstemplates.org 280+ Released for free under a Creative Commons Attribution 2.5 License 281+ */ 282+ 283+ /* Page basics */ 284+ * { 285+ font-family: verdana, sans-serif; 286+ } 287+ 288+ html body { 289+ margin: 0; 290+ padding: 0; 291+ background: #efefef; 292+ font-size: 12px; 293+ color: #1e1e1e; 294+ } 295+ 296+ /* Page displayed title area */ 297+ #titles { 298+ margin-left: 15px; 299+ padding: 10px; 300+ padding-left: 100px; 301+ background: url('http://www.squid-cache.org/Artwork/SN.png') no-repeat left; 302+ } 303+ 304+ /* initial title */ 305+ #titles h1 { 306+ color: #000000; 307+ } 308+ #titles h2 { 309+ color: #000000; 310+ } 311+ 312+ /* special event: FTP success page titles */ 313+ #titles ftpsuccess { 314+ background-color:#00ff00; 315+ width:100%; 316+ } 317+ 318+ /* Page displayed body content area */ 319+ #content { 320+ padding: 10px; 321+ background: #ffffff; 322+ } 323+ 324+ /* General text */ 325+ p { 326+ } 327+ 328+ /* error brief description */ 329+ #error p { 330+ } 331+ 332+ /* some data which may have caused the problem */ 333+ #data { 334+ } 335+ 336+ /* the error message received from the system or other software */ 337+ #sysmsg { 338+ } 339+ 340+ pre { 341+ font-family:sans-serif; 342+ } 343+ 344+ /* special event: FTP / Gopher directory listing */ 345+ #dirmsg { 346+ font-family: courier; 347+ color: black; 348+ font-size: 10pt; 349+ } 350+ #dirlisting { 351+ margin-left: 2%; 352+ margin-right: 2%; 353+ } 354+ #dirlisting tr.entry td.icon,td.filename,td.size,td.date { 355+ border-bottom: groove; 356+ } 357+ #dirlisting td.size { 358+ width: 50px; 359+ text-align: right; 360+ padding-right: 5px; 361+ } 362+ 363+ /* horizontal lines */ 364+ hr { 365+ margin: 0; 366+ } 367+ 368+ /* page displayed footer area */ 369+ #footer { 370+ font-size: 9px; 371+ padding-left: 10px; 372+ } 373+ 374+ 375+ body 376+ :lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; } 377+ :lang(he) { direction: rtl; float: right; } 378+ --></style> 379+ </head><body> 380+ <div id="titles"> 381+ <h1>ERROR</h1> 382+ <h2>The requested URL could not be retrieved</h2> 383+ </div> 384+ <hr> 385+ 386+ <div id="content"> 387+ <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> 388+ 389+ <blockquote id="error"> 390+ <p><b>Access Denied.</b></p> 391+ </blockquote> 392+ 393+ <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> 394+ 395+ <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%3A15%3A58%20GMT%0D%0A%0D%0AClientIP%3A%2010.235.61.14%0D%0A%0D%0AHTTP%20Request%3A%0D%0APOST%20%2Fget.inc%3Ftest%3Dfile%20HTTP%2F1.0%0AHost%3A%20localhost%3A8964%0D%0AAccept%3A%20*%2F*%0D%0AProxy-Connection%3A%20Keep-Alive%0D%0AContent-Length%3A%20205%0D%0AContent-Type%3A%20multipart%2Fform-data%3B%20boundary%3D------------------------711f83c92551609d%0D%0A%0D%0A%0D%0A">hongze@staff.sina.com.cn</a>.</p> 396+ <br> 397+ </div> 398+ 399+ <hr> 400+ <div id="footer"> 401+ <p>Generated Tue, 09 Nov 2021 03:15:58 GMT by 10.81.254.59 (squid/3.1.10)</p> 402+ <!-- ERR_ACCESS_DENIED --> 403+ </div> 404+ </body></html> 405+ " 406+ string(3321) "<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 407+ <html><head> 408+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 409+ <title>ERROR: The requested URL could not be retrieved</title> 410+ <style type="text/css"><!-- 411+ /* 412+ Stylesheet for Squid Error pages 413+ Adapted from design by Free CSS Templates 414+ http://www.freecsstemplates.org 415+ Released for free under a Creative Commons Attribution 2.5 License 416+ */ 417+ 418+ /* Page basics */ 419+ * { 420+ font-family: verdana, sans-serif; 421+ } 422+ 423+ html body { 424+ margin: 0; 425+ padding: 0; 426+ background: #efefef; 427+ font-size: 12px; 428+ color: #1e1e1e; 429+ } 430+ 431+ /* Page displayed title area */ 432+ #titles { 433+ margin-left: 15px; 434+ padding: 10px; 435+ padding-left: 100px; 436+ background: url('http://www.squid-cache.org/Artwork/SN.png') no-repeat left; 437+ } 438+ 439+ /* initial title */ 440+ #titles h1 { 441+ color: #000000; 442+ } 443+ #titles h2 { 444+ color: #000000; 445+ } 446+ 447+ /* special event: FTP success page titles */ 448+ #titles ftpsuccess { 449+ background-color:#00ff00; 450+ width:100%; 451+ } 452+ 453+ /* Page displayed body content area */ 454+ #content { 455+ padding: 10px; 456+ background: #ffffff; 457+ } 458+ 459+ /* General text */ 460+ p { 461+ } 462+ 463+ /* error brief description */ 464+ #error p { 465+ } 466+ 467+ /* some data which may have caused the problem */ 468+ #data { 469+ } 470+ 471+ /* the error message received from the system or other software */ 472+ #sysmsg { 473+ } 474+ 475+ pre { 476+ font-family:sans-serif; 477+ } 478+ 479+ /* special event: FTP / Gopher directory listing */ 480+ #dirmsg { 481+ font-family: courier; 482+ color: black; 483+ font-size: 10pt; 484+ } 485+ #dirlisting { 486+ margin-left: 2%; 487+ margin-right: 2%; 488+ } 489+ #dirlisting tr.entry td.icon,td.filename,td.size,td.date { 490+ border-bottom: groove; 491+ } 492+ #dirlisting td.size { 493+ width: 50px; 494+ text-align: right; 495+ padding-right: 5px; 496+ } 497+ 498+ /* horizontal lines */ 499+ hr { 500+ margin: 0; 501+ } 502+ 503+ /* page displayed footer area */ 504+ #footer { 505+ font-size: 9px; 506+ padding-left: 10px; 507+ } 508+ 509+ 510+ body 511+ :lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; } 512+ :lang(he) { direction: rtl; float: right; } 513+ --></style> 514+ </head><body> 515+ <div id="titles"> 516+ <h1>ERROR</h1> 517+ <h2>The requested URL could not be retrieved</h2> 518+ </div> 519+ <hr> 520+ 521+ <div id="content"> 522+ <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> 523+ 524+ <blockquote id="error"> 525+ <p><b>Access Denied.</b></p> 526+ </blockquote> 527+ 528+ <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> 529+ 530+ <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%3A15%3A58%20GMT%0D%0A%0D%0AClientIP%3A%2010.235.61.14%0D%0A%0D%0AHTTP%20Request%3A%0D%0APOST%20%2Fget.inc%3Ftest%3Dfile%20HTTP%2F1.0%0AHost%3A%20localhost%3A8964%0D%0AAccept%3A%20*%2F*%0D%0AProxy-Connection%3A%20Keep-Alive%0D%0AContent-Length%3A%20191%0D%0AContent-Type%3A%20multipart%2Fform-data%3B%20boundary%3D------------------------ac2b7b6367d6effb%0D%0A%0D%0A%0D%0A">hongze@staff.sina.com.cn</a>.</p> 531+ <br> 532+ </div> 533+ 534+ <hr> 535+ <div id="footer"> 536+ <p>Generated Tue, 09 Nov 2021 03:15:58 GMT by 10.81.254.59 (squid/3.1.10)</p> 537+ <!-- ERR_ACCESS_DENIED --> 538+ </div> 539+ </body></html> 540+ "