1--TEST--
2session rfc1867 sid post
3--INI--
4file_uploads=1
5error_reporting=E_ALL&~E_NOTICE
6comment=debug builds show some additional E_NOTICE errors
7upload_max_filesize=1024
8session.save_path=
9session.name=PHPSESSID
10session.use_cookies=1
11session.use_only_cookies=0
12session.upload_progress.enabled=1
13session.upload_progress.cleanup=0
14session.upload_progress.prefix=upload_progress_
15session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
16session.upload_progress.freq=0
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  [%u|b%"file1"]=>
52  array(5) {
53    [%u|b%"name"]=>
54    %string|unicode%(9) "file1.txt"
55    [%u|b%"type"]=>
56    %string|unicode%(0) ""
57    [%u|b%"tmp_name"]=>
58    %string|unicode%(%d) "%s"
59    [%u|b%"error"]=>
60    int(0)
61    [%u|b%"size"]=>
62    int(1)
63  }
64  [%u|b%"file2"]=>
65  array(5) {
66    [%u|b%"name"]=>
67    %string|unicode%(9) "file2.txt"
68    [%u|b%"type"]=>
69    %string|unicode%(0) ""
70    [%u|b%"tmp_name"]=>
71    %string|unicode%(%d) "%s"
72    [%u|b%"error"]=>
73    int(0)
74    [%u|b%"size"]=>
75    int(1)
76  }
77}
78array(5) {
79  [%u|b%"start_time"]=>
80  int(%d)
81  [%u|b%"content_length"]=>
82  int(%d)
83  [%u|b%"bytes_processed"]=>
84  int(%d)
85  [%u|b%"done"]=>
86  bool(true)
87  [%u|b%"files"]=>
88  array(2) {
89    [0]=>
90    array(7) {
91      [%u|b%"field_name"]=>
92      %unicode|string%(5) "file1"
93      [%u|b%"name"]=>
94      %unicode|string%(9) "file1.txt"
95      [%u|b%"tmp_name"]=>
96      %unicode|string%(%d) "%s"
97      [%u|b%"error"]=>
98      int(0)
99      [%u|b%"done"]=>
100      bool(true)
101      [%u|b%"start_time"]=>
102      int(%d)
103      [%u|b%"bytes_processed"]=>
104      int(1)
105    }
106    [1]=>
107    array(7) {
108      [%u|b%"field_name"]=>
109      %unicode|string%(5) "file2"
110      [%u|b%"name"]=>
111      %unicode|string%(9) "file2.txt"
112      [%u|b%"tmp_name"]=>
113      %unicode|string%(%d) "%s"
114      [%u|b%"error"]=>
115      int(0)
116      [%u|b%"done"]=>
117      bool(true)
118      [%u|b%"start_time"]=>
119      int(%d)
120      [%u|b%"bytes_processed"]=>
121      int(1)
122    }
123  }
124}
125