Commit 18dee43
authored
Add
* Add SAPI_HEADER_DELETE_PREFIX operation
The session ext currently munges into the linked list of headers
itself, because the delete header API is given the key for headers to
delete. The session ext wants to use a prefix past the colon separator,
for i.e. "Set-Cookie: PHPSESSID=", to eliminate only the specific cookie
rather than all cookies.
This changes the SAPI code to add a new header op to take a prefix
instead. Call sites are yet unchanged. Also fix some whitespace.
* Simplify cookie setting code in ext/session
Use the modern SAPI header ops API, including the remove prefix op we
just added.
* [ci skip] Remove redundant and unnecessary comment
The purpose of this is clear, and after refactoring, the special case is
no longer there, so it has no value.
* Un-deprecate simple add/replace header API, use it
Suggestion from Jakub.
* Restore the optimization removing session cookies had
I don't think this needs to be special cased with the parameter.
* Move setting header length to caller
Suggestion from Jakub.
* [ci skip] adjust tab count
It may be better to use spaces in here instead.
* Use session_cookie_len rather than calling strlenSAPI_HEADER_DELETE_PREFIX, make ext/session use it (php#18678)1 parent a262419 commit 18dee43
3 files changed
+28
-42
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1335 | 1335 | | |
1336 | 1336 | | |
1337 | 1337 | | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | 1338 | | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
1348 | 1339 | | |
1349 | 1340 | | |
1350 | | - | |
| 1341 | + | |
1351 | 1342 | | |
1352 | 1343 | | |
1353 | 1344 | | |
1354 | 1345 | | |
1355 | | - | |
1356 | | - | |
1357 | | - | |
1358 | | - | |
1359 | | - | |
1360 | | - | |
1361 | | - | |
1362 | | - | |
1363 | | - | |
1364 | | - | |
1365 | | - | |
1366 | | - | |
1367 | | - | |
1368 | | - | |
1369 | | - | |
1370 | | - | |
1371 | | - | |
1372 | | - | |
1373 | | - | |
1374 | | - | |
1375 | | - | |
1376 | | - | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
1377 | 1351 | | |
1378 | 1352 | | |
1379 | 1353 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
597 | 597 | | |
598 | 598 | | |
599 | 599 | | |
600 | | - | |
| 600 | + | |
| 601 | + | |
601 | 602 | | |
602 | 603 | | |
603 | 604 | | |
604 | 605 | | |
605 | 606 | | |
606 | 607 | | |
607 | 608 | | |
608 | | - | |
| 609 | + | |
| 610 | + | |
609 | 611 | | |
610 | 612 | | |
611 | 613 | | |
| |||
653 | 655 | | |
654 | 656 | | |
655 | 657 | | |
656 | | - | |
| 658 | + | |
657 | 659 | | |
658 | 660 | | |
659 | 661 | | |
| |||
668 | 670 | | |
669 | 671 | | |
670 | 672 | | |
671 | | - | |
| 673 | + | |
672 | 674 | | |
673 | 675 | | |
674 | 676 | | |
| |||
691 | 693 | | |
692 | 694 | | |
693 | 695 | | |
| 696 | + | |
694 | 697 | | |
695 | 698 | | |
696 | 699 | | |
| |||
699 | 702 | | |
700 | 703 | | |
701 | 704 | | |
702 | | - | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
703 | 712 | | |
704 | 713 | | |
705 | 714 | | |
| |||
722 | 731 | | |
723 | 732 | | |
724 | 733 | | |
725 | | - | |
726 | | - | |
| 734 | + | |
| 735 | + | |
727 | 736 | | |
728 | 737 | | |
729 | 738 | | |
| |||
733 | 742 | | |
734 | 743 | | |
735 | 744 | | |
736 | | - | |
| 745 | + | |
737 | 746 | | |
738 | 747 | | |
739 | 748 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
189 | 192 | | |
190 | 193 | | |
191 | 194 | | |
192 | 195 | | |
193 | 196 | | |
194 | 197 | | |
| 198 | + | |
195 | 199 | | |
196 | 200 | | |
197 | 201 | | |
198 | 202 | | |
199 | 203 | | |
200 | 204 | | |
201 | 205 | | |
202 | | - | |
203 | 206 | | |
204 | 207 | | |
205 | 208 | | |
| |||
0 commit comments