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