Mailing List Archive

#1843: HTTP/1.0 POST without C-L should error out earlier
#1843: HTTP/1.0 POST without C-L should error out earlier
----------------------+-------------------
Reporter: fgsch | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Keywords:
----------------------+-------------------
In a6a6e97a we allowed POST without a body.
For HTTP/1.0 however, the Content-Length must be present.

Currently, we will pass the request and assume chunked, which is incorrect
for HTTP/1.0. We should error out earlier.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1843>
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: #1843: HTTP/1.0 POST without C-L should error out earlier [ In reply to ]
#1843: HTTP/1.0 POST without C-L should error out earlier
----------------------+--------------------
Reporter: fgsch | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Resolution:
Keywords: |
----------------------+--------------------
Description changed by fgsch:

Old description:

> In a6a6e97a we allowed POST without a body.
> For HTTP/1.0 however, the Content-Length must be present.
>
> Currently, we will pass the request and assume chunked, which is
> incorrect for HTTP/1.0. We should error out earlier.

New description:

In a6a6e97a we allowed POST without a body.
For HTTP/1.0 however, the Content-Length must be present.

Currently, we will pass the request and assume chunked, which is incorrect
for HTTP/1.0. Since there is no body, we timeout eventually:

{{{
1002 FetchError b req.body read error: 11 (Resource temporarily
unavailable)
1002 FetchError b backend write error: 11 (Resource temporarily
unavailable)
}}}

We should error out earlier.

--

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1843#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: #1843: HTTP/1.0 POST without C-L should error out earlier [ In reply to ]
#1843: HTTP/1.0 POST without C-L should error out earlier
----------------------+--------------------
Reporter: fgsch | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Resolution:
Keywords: |
----------------------+--------------------

Comment (by fgsch):

Fix attached.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1843#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: #1843: HTTP/1.0 POST without C-L should error out earlier [ In reply to ]
#1843: HTTP/1.0 POST without C-L should error out earlier
----------------------+--------------------
Reporter: fgsch | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Resolution:
Keywords: |
----------------------+--------------------

Comment (by fgsch):

After some more reading I think this should cover PUT and POST.

Revised patch attached.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1843#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: #1843: HTTP/1.0 POST without C-L should error out earlier [ In reply to ]
#1843: HTTP/1.0 POST without C-L should error out earlier
----------------------+--------------------
Reporter: fgsch | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Resolution:
Keywords: |
----------------------+--------------------

Comment (by fgsch):

Version 3 attached after discussing with phk.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1843#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: #1843: HTTP/1.0 POST without C-L should error out earlier [ In reply to ]
#1843: HTTP/1.0 POST without C-L should error out earlier
----------------------+---------------------------------------------
Reporter: fgsch | Owner: Federico G. Schwindt <fgsch@…>
Type: defect | Status: closed
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Resolution: fixed
Keywords: |
----------------------+---------------------------------------------
Changes (by Federico G. Schwindt <fgsch@…>):

* owner: => Federico G. Schwindt <fgsch@…>
* status: new => closed
* resolution: => fixed


Comment:

In [bbf5a3409842039a48b5fd04d98d0c136d575777]:
{{{
#!CommitTicketReference repository=""
revision="bbf5a3409842039a48b5fd04d98d0c136d575777"
Fail HTTP/1.0 POST and PUT requests without C-L

It is not allowed by the spec and we incorrectly assumed chunked
and eventually timed out. OK'd by phk@.
Fixes #1843.
}}}

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1843#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: #1843: HTTP/1.0 POST without C-L should error out earlier [ In reply to ]
#1843: HTTP/1.0 POST without C-L should error out earlier
----------------------+---------------------------------------------
Reporter: fgsch | Owner: Federico G. Schwindt <fgsch@…>
Type: defect | Status: closed
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Resolution: fixed
Keywords: |
----------------------+---------------------------------------------

Comment (by Lasse Karstensen <lkarsten@…>):

In [b9946b4b0bc65b935580fe7db999b1b6c5558e19]:
{{{
#!CommitTicketReference repository=""
revision="b9946b4b0bc65b935580fe7db999b1b6c5558e19"
Fail HTTP/1.0 POST and PUT requests without C-L

It is not allowed by the spec and we incorrectly assumed chunked
and eventually timed out. OK'd by phk@.
Fixes #1843.
}}}

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