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