rfc1867_sid_post.phpt 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. --TEST--
  2. session rfc1867 sid post
  3. --INI--
  4. file_uploads=1
  5. upload_max_filesize=1024
  6. session.save_path=
  7. session.name=PHPSESSID
  8. session.use_strict_mode=0
  9. session.use_cookies=1
  10. session.use_only_cookies=0
  11. session.upload_progress.enabled=1
  12. session.upload_progress.cleanup=0
  13. session.upload_progress.prefix=upload_progress_
  14. session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
  15. session.upload_progress.freq=0
  16. session.save_handler=files
  17. --EXTENSIONS--
  18. session
  19. --SKIPIF--
  20. <?php include('skipif.inc'); ?>
  21. --POST_RAW--
  22. Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
  23. -----------------------------20896060251896012921717172737
  24. Content-Disposition: form-data; name="PHPSESSID"
  25. rfc1867-sid-post
  26. -----------------------------20896060251896012921717172737
  27. Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS"
  28. rfc1867_sid_post.php
  29. -----------------------------20896060251896012921717172737
  30. Content-Disposition: form-data; name="file1"; filename="file1.txt"
  31. 1
  32. -----------------------------20896060251896012921717172737
  33. Content-Disposition: form-data; name="file2"; filename="file2.txt"
  34. 2
  35. -----------------------------20896060251896012921717172737--
  36. --FILE--
  37. <?php
  38. session_start();
  39. var_dump(session_id());
  40. var_dump(basename(__FILE__) == $_POST[ini_get("session.upload_progress.name")]);
  41. var_dump($_FILES);
  42. var_dump($_SESSION["upload_progress_" . basename(__FILE__)]);
  43. session_destroy();
  44. ?>
  45. --EXPECTF--
  46. string(%d) "rfc1867-sid-post"
  47. bool(true)
  48. array(2) {
  49. ["file1"]=>
  50. array(6) {
  51. ["name"]=>
  52. string(9) "file1.txt"
  53. ["full_path"]=>
  54. string(9) "file1.txt"
  55. ["type"]=>
  56. string(0) ""
  57. ["tmp_name"]=>
  58. string(%d) "%s"
  59. ["error"]=>
  60. int(0)
  61. ["size"]=>
  62. int(1)
  63. }
  64. ["file2"]=>
  65. array(6) {
  66. ["name"]=>
  67. string(9) "file2.txt"
  68. ["full_path"]=>
  69. string(9) "file2.txt"
  70. ["type"]=>
  71. string(0) ""
  72. ["tmp_name"]=>
  73. string(%d) "%s"
  74. ["error"]=>
  75. int(0)
  76. ["size"]=>
  77. int(1)
  78. }
  79. }
  80. array(5) {
  81. ["start_time"]=>
  82. int(%d)
  83. ["content_length"]=>
  84. int(%d)
  85. ["bytes_processed"]=>
  86. int(%d)
  87. ["done"]=>
  88. bool(true)
  89. ["files"]=>
  90. array(2) {
  91. [0]=>
  92. array(7) {
  93. ["field_name"]=>
  94. string(5) "file1"
  95. ["name"]=>
  96. string(9) "file1.txt"
  97. ["tmp_name"]=>
  98. string(%d) "%s"
  99. ["error"]=>
  100. int(0)
  101. ["done"]=>
  102. bool(true)
  103. ["start_time"]=>
  104. int(%d)
  105. ["bytes_processed"]=>
  106. int(1)
  107. }
  108. [1]=>
  109. array(7) {
  110. ["field_name"]=>
  111. string(5) "file2"
  112. ["name"]=>
  113. string(9) "file2.txt"
  114. ["tmp_name"]=>
  115. string(%d) "%s"
  116. ["error"]=>
  117. int(0)
  118. ["done"]=>
  119. bool(true)
  120. ["start_time"]=>
  121. int(%d)
  122. ["bytes_processed"]=>
  123. int(1)
  124. }
  125. }
  126. }