Commit ecd4679
Deprecate the never-cache-responses-with-query options and make them opt-in
Assigning heuristic freshness to a response with a query component is no longer prohibited by the HTTP caching specification. ResponseCachingPolicy now consults the never-cache-query options only when they are explicitly enabled, so in the default configuration a response with a query component is cached like any other. isNeverCacheHTTP10ResponsesWithQuery, isNeverCacheHTTP11ResponsesWithQuery and their builder setters are deprecated, as is HTTP/1.0 response caching. An origin that does not want a response cached should send an explicit directive such as Cache-Control: no-cache.1 parent cb0062c commit ecd4679
4 files changed
Lines changed: 52 additions & 20 deletions
File tree
- httpclient5-cache/src
- main/java/org/apache/hc/client5/http/impl/cache
- test/java/org/apache/hc/client5/http/impl/cache
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
44 | 50 | | |
45 | 51 | | |
46 | 52 | | |
| |||
189 | 195 | | |
190 | 196 | | |
191 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
192 | 203 | | |
| 204 | + | |
193 | 205 | | |
194 | 206 | | |
195 | 207 | | |
| |||
205 | 217 | | |
206 | 218 | | |
207 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
208 | 224 | | |
| 225 | + | |
209 | 226 | | |
210 | 227 | | |
211 | 228 | | |
| |||
499 | 516 | | |
500 | 517 | | |
501 | 518 | | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
502 | 524 | | |
| 525 | + | |
503 | 526 | | |
504 | 527 | | |
505 | 528 | | |
| |||
535 | 558 | | |
536 | 559 | | |
537 | 560 | | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
538 | 565 | | |
| 566 | + | |
539 | 567 | | |
540 | 568 | | |
541 | 569 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| |||
Lines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
133 | 136 | | |
134 | 137 | | |
135 | 138 | | |
| |||
Lines changed: 11 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
524 | | - | |
| 524 | + | |
525 | 525 | | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
| 526 | + | |
533 | 527 | | |
534 | 528 | | |
535 | 529 | | |
536 | | - | |
537 | | - | |
| 530 | + | |
| 531 | + | |
538 | 532 | | |
539 | 533 | | |
540 | 534 | | |
541 | 535 | | |
542 | 536 | | |
543 | | - | |
544 | | - | |
| 537 | + | |
| 538 | + | |
545 | 539 | | |
546 | 540 | | |
547 | 541 | | |
| |||
583 | 577 | | |
584 | 578 | | |
585 | 579 | | |
| 580 | + | |
586 | 581 | | |
587 | 582 | | |
588 | 583 | | |
| |||
591 | 586 | | |
592 | 587 | | |
593 | 588 | | |
| 589 | + | |
594 | 590 | | |
595 | 591 | | |
596 | 592 | | |
| |||
660 | 656 | | |
661 | 657 | | |
662 | 658 | | |
| 659 | + | |
663 | 660 | | |
664 | 661 | | |
665 | 662 | | |
666 | 663 | | |
667 | 664 | | |
668 | 665 | | |
669 | 666 | | |
| 667 | + | |
670 | 668 | | |
671 | 669 | | |
672 | 670 | | |
| |||
864 | 862 | | |
865 | 863 | | |
866 | 864 | | |
| 865 | + | |
867 | 866 | | |
868 | 867 | | |
869 | 868 | | |
| |||
0 commit comments