Commit 0f8f9a2
committed
cache_fetch: Send Content-Length: 0 for anything not GET or HEAD
otherwise keep the existing logic of sending no Content-Length header if there
is no request body.
This approach was determined to be better than the inverse of sending C-L: 0 for
specific methods to avoid backends sending 411 responses as noted in
#4331 (comment)
This code runs before vcl_backend_fetch, so should VCL gain back control over
Content-Length as proposed in #4331, it will be possible again to override this
default.
Fixes #4331 for the special case1 parent f7efd59 commit 0f8f9a2
File tree
3 files changed
+29
-4
lines changed- bin
- varnishd/cache
- varnishtest/tests
3 files changed
+29
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
| 385 | + | |
385 | 386 | | |
386 | 387 | | |
387 | 388 | | |
| |||
396 | 397 | | |
397 | 398 | | |
398 | 399 | | |
399 | | - | |
400 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
401 | 408 | | |
402 | 409 | | |
403 | 410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
0 commit comments