Mailing List Archive

#1757: If-Match header wrong format
#1757: If-Match header wrong format
---------------------------------+----------------------
Reporter: vko | Type: defect
Status: new | Priority: normal
Milestone: Varnish 4.0 release | Component: varnishd
Version: 4.0.3 | Severity: normal
Keywords: If-Match |
---------------------------------+----------------------
We have some trouble with the If-Match header. So far we understand If-
Match or If-None-Match should be like this format

If-None-Match: "xyzzy"
If-None-Match: W/"xyzzy"
If-None-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
If-None-Match: W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz"
If-None-Match: *
(Examples from http://www.freesoft.org/CIE/RFC/2068/187.htm)


In the varnishlog we see the format like

BereqHeader If-Match: W/0

As you can see without quotation marks. Our expectation is like

BereqHeader If-Match: W/"0"

It seems to be a bug in varnish.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1757>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1757: If-Match header wrong format [ In reply to ]
#1757: If-Match header wrong format
----------------------+----------------------------------
Reporter: vko | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Varnish 4.0 release
Component: varnishd | Version: 4.0.3
Severity: normal | Resolution:
Keywords: If-Match |
----------------------+----------------------------------

Comment (by fgsch):

Works for me.

Is your backend sending Etag: "0" or Etag: 0?

The entity-tag definition is:

entity-tag = [ weak ] opaque-tag
weak = "W/"
opaque-tag = quoted-string

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1757#comment:1>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1757: If-Match header wrong format [ In reply to ]
#1757: If-Match header wrong format
----------------------+----------------------------------
Reporter: vko | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Varnish 4.0 release
Component: varnishd | Version: 4.0.3
Severity: normal | Resolution:
Keywords: If-Match |
----------------------+----------------------------------
Description changed by fgsch:

Old description:

> We have some trouble with the If-Match header. So far we understand If-
> Match or If-None-Match should be like this format
>
> If-None-Match: "xyzzy"
> If-None-Match: W/"xyzzy"
> If-None-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
> If-None-Match: W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz"
> If-None-Match: *
> (Examples from http://www.freesoft.org/CIE/RFC/2068/187.htm)
>

> In the varnishlog we see the format like
>
> BereqHeader If-Match: W/0
>
> As you can see without quotation marks. Our expectation is like
>
> BereqHeader If-Match: W/"0"
>
> It seems to be a bug in varnish.

New description:

We have some trouble with the If-Match header. So far we understand If-
Match or If-None-Match should be like this format

{{{
If-None-Match: "xyzzy"
If-None-Match: W/"xyzzy"
If-None-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
If-None-Match: W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz"
If-None-Match: *
(Examples from http://www.freesoft.org/CIE/RFC/2068/187.htm)
}}}

In the varnishlog we see the format like

BereqHeader If-Match: W/0

As you can see without quotation marks. Our expectation is like

BereqHeader If-Match: W/"0"

It seems to be a bug in varnish.

--

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1757#comment:2>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1757: If-Match header wrong format [ In reply to ]
#1757: If-Match header wrong format
----------------------+----------------------------------
Reporter: vko | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Varnish 4.0 release
Component: varnishd | Version: 4.0.3
Severity: normal | Resolution:
Keywords: If-Match |
----------------------+----------------------------------

Comment (by vko):

Ok. After the researching with our developers we now what exact the
problem is. If-Match header is not the problem but Etag because If-Match
gets the value of Etag.

The problem is varnish set Etag in this format

ETag: W/7

According to RFC2616
(http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.19, see
Examples) the right format should be

ETag: W/"7"

Should I open a new bug because the problem Etag and not If-Match header
is?

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1757#comment:3>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1757: If-Match header wrong format [ In reply to ]
#1757: If-Match header wrong format
----------------------+----------------------------------
Reporter: vko | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Varnish 4.0 release
Component: varnishd | Version: 4.0.3
Severity: normal | Resolution:
Keywords: If-Match |
----------------------+----------------------------------

Comment (by scoof):

The ETag is set by your backend, not varnish.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1757#comment:4>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1757: If-Match header wrong format [ In reply to ]
#1757: If-Match header wrong format
----------------------+----------------------------------
Reporter: vko | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Varnish 4.0 release
Component: varnishd | Version: 4.0.3
Severity: normal | Resolution:
Keywords: If-Match |
----------------------+----------------------------------

Comment (by vko):

Yes, backend set Etag but varnish changes it if it should be "Weak". In
our case backend set Etag to "7". As varnish sees that Etag has to be
modified because of "weakness" it modifies Etag in wrong format. It should
be Etag: W/"7" but we see in the varnishlog W/7.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1757#comment:5>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1757: If-Match header wrong format [ In reply to ]
#1757: If-Match header wrong format
----------------------+----------------------------------
Reporter: vko | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Varnish 4.0 release
Component: varnishd | Version: 4.0.3
Severity: normal | Resolution:
Keywords: If-Match |
----------------------+----------------------------------

Comment (by fgsch):

Please provide a varnishlog capture.

In my tests if the backend sends the ETag in the correct format, varnish
will respect it and the resulting header is W/"<ETag from backend>".

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1757#comment:6>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1757: If-Match header wrong format [ In reply to ]
#1757: If-Match header wrong format
----------------------+----------------------------------
Reporter: vko | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Varnish 4.0 release
Component: varnishd | Version: 4.0.3
Severity: normal | Resolution:
Keywords: If-Match |
----------------------+----------------------------------

Comment (by vko):

Sorry, the information I provided to you about Etag seems to be not right.
Our developers are checking if backend sets Etag to "7" or to 7. I'll
write it later. Sorry.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1757#comment:7>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1757: If-Match header wrong format [ In reply to ]
#1757: If-Match header wrong format
----------------------+----------------------------------
Reporter: vko | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Varnish 4.0 release
Component: varnishd | Version: 4.0.3
Severity: normal | Resolution:
Keywords: If-Match |
----------------------+----------------------------------

Comment (by fgsch):

vko, any update on this?

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1757#comment:8>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1757: If-Match header wrong format [ In reply to ]
#1757: If-Match header wrong format
----------------------+----------------------------------
Reporter: vko | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Varnish 4.0 release
Component: varnishd | Version: 4.0.3
Severity: normal | Resolution:
Keywords: If-Match |
----------------------+----------------------------------

Comment (by vko):

I got today the confirmation that our backend set the Etag-Header to 7
without quation marks. I'm sorry again. The problem was our backend and
not varnish. Please close this bug report. Thank you.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1757#comment:9>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1757: If-Match header wrong format [ In reply to ]
#1757: If-Match header wrong format
----------------------+----------------------------------
Reporter: vko | Owner:
Type: defect | Status: closed
Priority: normal | Milestone: Varnish 4.0 release
Component: varnishd | Version: 4.0.3
Severity: normal | Resolution: invalid
Keywords: If-Match |
----------------------+----------------------------------
Changes (by fgsch):

* status: new => closed
* resolution: => invalid


Comment:

Reporter confirmed problem on their backend.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1757#comment:10>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs