Commit ccdcd9b
committed
bug #58010 [PsrHttpMessageBridge] Fix conversion of partitioned cookies in the PSR-7 bridge (stof)
This PR was submitted for the 7.2 branch but it was merged into the 6.4 branch instead.
Discussion
----------
[PsrHttpMessageBridge] Fix conversion of partitioned cookies in the PSR-7 bridge
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | n/a
| License | MIT
`symfony/http-foundation` supports partitioned cookies in 6.4+. However, the PSR-7 was failing to convert such partitioned cookies when creating an HttpFoundation Response because it used its own parsing logic for the `Set-Cookie` header instead of reusing the logic exposed by HttpFoundation (since Symfony 3.3), and that logic was outdated. I fixed that by using `Cookie::fromString` for the parsing of the cookie.
Note that the logic in the bridge was also only testing a few cases, while HttpFoundation has a more extensive test coverage for its parsing algorithm. And there is no reason to maintain such parsing twice (with totally different implementations)
Commits
-------
be27495 Fix conversion of partitioned cookies in the PSR-7 bridgeFile tree
Expand file treeCollapse file tree
1 file changed
+1
-78
lines changedOpen diff view settings
Filter options
- src/Symfony/Bridge/PsrHttpMessage/Factory
Expand file treeCollapse file tree
1 file changed
+1
-78
lines changedOpen diff view settings
Collapse file
src/Symfony/Bridge/PsrHttpMessage/Factory/HttpFoundationFactory.php
Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PsrHttpMessage/Factory/HttpFoundationFactory.php+1-78Lines changed: 1 addition & 78 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
132 | 132 | |
133 | 133 | |
134 | 134 | |
135 | | - |
| 135 | + |
136 | 136 | |
137 | 137 | |
138 | 138 | |
139 | 139 | |
140 | 140 | |
141 | | - |
142 | | - |
143 | | - |
144 | | - |
145 | | - |
146 | | - |
147 | | - |
148 | | - |
149 | | - |
150 | | - |
151 | | - |
152 | | - |
153 | | - |
154 | | - |
155 | | - |
156 | | - |
157 | | - |
158 | | - |
159 | | - |
160 | | - |
161 | | - |
162 | | - |
163 | | - |
164 | | - |
165 | | - |
166 | | - |
167 | | - |
168 | | - |
169 | | - |
170 | | - |
171 | | - |
172 | | - |
173 | | - |
174 | | - |
175 | | - |
176 | | - |
177 | | - |
178 | | - |
179 | | - |
180 | | - |
181 | | - |
182 | | - |
183 | | - |
184 | | - |
185 | | - |
186 | | - |
187 | | - |
188 | | - |
189 | | - |
190 | | - |
191 | | - |
192 | | - |
193 | | - |
194 | | - |
195 | | - |
196 | | - |
197 | | - |
198 | | - |
199 | | - |
200 | | - |
201 | | - |
202 | | - |
203 | | - |
204 | | - |
205 | | - |
206 | | - |
207 | | - |
208 | | - |
209 | | - |
210 | | - |
211 | | - |
212 | | - |
213 | | - |
214 | | - |
215 | | - |
216 | | - |
217 | | - |
218 | 141 | |
219 | 142 | |
220 | 143 | |
|
0 commit comments