Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

wrong response in vcl_error #11

Open
wants to merge 1 commit into from

1 participant

Shohei Tanaka
Shohei Tanaka
xcir commented June 01, 2012

1xx,204,304 response must not include message body.
But, default vcl_error include message body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jun 02, 2012
Shohei Tanaka 1xx,204,304 response must not include message body. ac556a0
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. 5  bin/varnishd/default.vcl
5  bin/varnishd/default.vcl
@@ -122,6 +122,11 @@ sub vcl_deliver {
122 122
  * We can come here "invisibly" with the following errors:  413, 417 & 503
123 123
  */
124 124
 sub vcl_error {
  125
+    if((obj.status >= 100 && obj.status < 200) ||
  126
+        obj.status == 204 ||
  127
+        obj.status == 304) {
  128
+            return (deliver);
  129
+    }
125 130
     set obj.http.Content-Type = "text/html; charset=utf-8";
126 131
     set obj.http.Retry-After = "5";
127 132
     synthetic {"
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.