Mailing List Archive

#1662: BereqProtocol showing twice for HTTP 1.0 requests
#1662: BereqProtocol showing twice for HTTP 1.0 requests
--------------------+-------------------
Reporter: fgsch | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: build | Version: trunk
Severity: normal | Keywords:
--------------------+-------------------
The attached case displays BereqProtocol twice, one for HTTP 1.0 and one
for HTTP 1.1.

**** v1 0.4 vsl| 1002 BereqMethod b GET
**** v1 0.4 vsl| 1002 BereqURL b /
**** v1 0.4 vsl| 1002 BereqProtocol b HTTP/1.0
**** v1 0.4 vsl| 1002 BereqHeader b X-Forwarded-For: 127.0.0.1
**** v1 0.4 vsl| 1002 BereqProtocol b HTTP/1.1

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1662>
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: #1662: BereqProtocol showing twice for HTTP 1.0 requests [ In reply to ]
#1662: BereqProtocol showing twice for HTTP 1.0 requests
--------------------+--------------------
Reporter: fgsch | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: build | Version: trunk
Severity: normal | Resolution:
Keywords: |
--------------------+--------------------
Description changed by fgsch:

Old description:

> The attached case displays BereqProtocol twice, one for HTTP 1.0 and one
> for HTTP 1.1.
>
> **** v1 0.4 vsl| 1002 BereqMethod b GET
> **** v1 0.4 vsl| 1002 BereqURL b /
> **** v1 0.4 vsl| 1002 BereqProtocol b HTTP/1.0
> **** v1 0.4 vsl| 1002 BereqHeader b X-Forwarded-For: 127.0.0.1
> **** v1 0.4 vsl| 1002 BereqProtocol b HTTP/1.1

New description:

The attached case displays BereqProtocol twice, one for HTTP 1.0 and one
for HTTP 1.1.

{{{
**** v1 0.4 vsl| 1002 BereqMethod b GET
**** v1 0.4 vsl| 1002 BereqURL b /
**** v1 0.4 vsl| 1002 BereqProtocol b HTTP/1.0
**** v1 0.4 vsl| 1002 BereqHeader b X-Forwarded-For: 127.0.0.1
**** v1 0.4 vsl| 1002 BereqProtocol b HTTP/1.1
}}}

--

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1662#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: #1662: BereqProtocol showing twice for HTTP 1.0 requests [ In reply to ]
#1662: BereqProtocol showing twice for HTTP 1.0 requests
--------------------+---------------------
Reporter: fgsch | Owner: aondio
Type: defect | Status: new
Priority: normal | Milestone:
Component: build | Version: trunk
Severity: normal | Resolution:
Keywords: |
--------------------+---------------------
Changes (by aondio):

* owner: => aondio


--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1662#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: #1662: BereqProtocol showing twice for HTTP 1.0 requests [ In reply to ]
#1662: BereqProtocol showing twice for HTTP 1.0 requests
--------------------+---------------------
Reporter: fgsch | Owner: aondio
Type: defect | Status: new
Priority: normal | Milestone:
Component: build | Version: trunk
Severity: normal | Resolution:
Keywords: |
--------------------+---------------------

Comment (by lkarsten):

We have the same situation for other non-header attributes of a bereq.

With the following VCL:
{{{
sub vcl_backend_fetch {
if (bereq.url ~ "/foo") {
set bereq.url = bereq.url + "&more_cake=yes";
set bereq.method = "OPTIONS";
}
set bereq.http.fakeheader = "headervalue";
unset bereq.http.fakeheader;
}
}}}

We see that it behaves the same for bereq.method and bereq.url:

{{{
* << BeReq >> 459249
- Begin bereq 459248 fetch
- Timestamp Start: 1424092291.716213 0.000000 0.000000
- BereqMethod GET
- BereqURL /foo/?26609
- BereqProtocol HTTP/1.0
- BereqHeader Host: hyse.org
- BereqHeader User-Agent: Python-urllib/2.7
- BereqHeader X-Forwarded-For: 2001:16d8:ee00:1c1::2
- BereqProtocol HTTP/1.1
- BereqHeader Accept-Encoding: gzip
- BereqHeader X-Varnish: 459249
- VCL_call BACKEND_FETCH
- BereqURL /foo/?26609&more_cake=yes
- BereqMethod OPTIONS
- BereqHeader fakeheader: headervalue
- BereqUnset fakeheader: headervalue
- VCL_return fetch
}}}

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1662#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: #1662: BereqProtocol showing twice for HTTP 1.0 requests [ In reply to ]
#1662: BereqProtocol showing twice for HTTP 1.0 requests
--------------------+---------------------
Reporter: fgsch | Owner: aondio
Type: defect | Status: new
Priority: normal | Milestone:
Component: build | Version: trunk
Severity: normal | Resolution:
Keywords: |
--------------------+---------------------

Comment (by lkarsten):

I think we either should leave it as it is, or invent some new
BereqProtoUnset/BereqLineProtocol/BereqChange vsl class to log that it
changed (or unset.)

That was we get the same (or similar) behavior as BereqUnset, but without
overloading BereqUnset to also include non-headers.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1662#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: #1662: BereqProtocol showing twice for HTTP 1.0 requests [ In reply to ]
#1662: BereqProtocol showing twice for HTTP 1.0 requests
--------------------+---------------------
Reporter: fgsch | Owner: aondio
Type: defect | Status: new
Priority: normal | Milestone:
Component: build | Version: trunk
Severity: normal | Resolution:
Keywords: |
--------------------+---------------------

Comment (by fgsch):

Since the Unset will be followed by the right tag, e.g.:

{{{
**** v1 0.7 vsl| 1003 RespUnset c HTTP/1.0
**** v1 0.7 vsl| 1003 RespProtocol c HTTP/1.1
}}}

Does it really matter whether we are overloading *Unset for these 3
fields?

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1662#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: #1662: BereqProtocol showing twice for HTTP 1.0 requests [ In reply to ]
#1662: BereqProtocol showing twice for HTTP 1.0 requests
--------------------+---------------------
Reporter: fgsch | Owner: aondio
Type: defect | Status: new
Priority: normal | Milestone:
Component: build | Version: trunk
Severity: normal | Resolution:
Keywords: |
--------------------+---------------------

Comment (by aondio):

Varnish just says when a field is unset.

{{{
-BereqHeader fakeheader: headervalue
-BereqUnset fakeheader: headervalue
-BereqHeader fakeheader: fakeheader
}}}

I think we can adopt the *Unset also for these 3 non-headers(method, url,
protocol).

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1662#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: #1662: BereqProtocol showing twice for HTTP 1.0 requests [ In reply to ]
#1662: BereqProtocol showing twice for HTTP 1.0 requests
--------------------+---------------------
Reporter: fgsch | Owner: aondio
Type: defect | Status: new
Priority: normal | Milestone:
Component: build | Version: trunk
Severity: normal | Resolution:
Keywords: |
--------------------+---------------------

Comment (by fgsch):

Proposed patch attached.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1662#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: #1662: BereqProtocol showing twice for HTTP 1.0 requests [ In reply to ]
#1662: BereqProtocol showing twice for HTTP 1.0 requests
--------------------+---------------------
Reporter: fgsch | Owner: aondio
Type: defect | Status: new
Priority: normal | Milestone:
Component: build | Version: trunk
Severity: normal | Resolution:
Keywords: |
--------------------+---------------------

Comment (by fgsch):

After further thinking I'm not convinced reusing xxxUnset is the right way
to go. [[br]]
This could be considered as something coming from VCL when it's not the
case.

Ideally varnish should only log things once. The current logging code
however have tentacles here and there, making logging at specific places
very difficult without changes.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1662#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: #1662: BereqProtocol showing twice for HTTP 1.0 requests [ In reply to ]
#1662: BereqProtocol showing twice for HTTP 1.0 requests
--------------------+---------------------
Reporter: fgsch | Owner: aondio
Type: defect | Status: closed
Priority: normal | Milestone:
Component: build | Version: trunk
Severity: normal | Resolution: fixed
Keywords: |
--------------------+---------------------
Changes (by Federico G. Schwindt <fgsch@…>):

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


Comment:

In [51e92b447c64f88afa3feb368f41a1136711aaa8]:
{{{
#!CommitTicketReference repository=""
revision="51e92b447c64f88afa3feb368f41a1136711aaa8"
Log calls http_ForceField() in VSL using xxxUnset

Previously we would force the protocol and method fields to HTTP/1.1 and
GET, respectively, but hide this from VSL showing 2 different entries
for BereqProtocol and/or BereqMethod.

Discussed with arianna@.

Fixes #1662
}}}

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1662#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