[Django] #27346: Stop setting the Content-Length header in ConditionalGetMiddleware

7 views
Skip to first unread message

Django

unread,
Oct 14, 2016, 12:37:53 AM10/14/16
to django-...@googlegroups.com
#27346: Stop setting the Content-Length header in ConditionalGetMiddleware
-----------------------------------------+--------------------
Reporter: Kevin Christopher Henry | Owner: nobody
Type: Uncategorized | Status: new
Component: HTTP handling | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-----------------------------------------+--------------------
With #5897 we started setting `Content-Length` in `CommonMiddleware`. With
#26447 we started moving conditional request handling out of
`CommonMiddleware` and into `ConditionalGetMiddleware`. This separation of
concerns is a good thing. Setting `Content-Length` doesn't have anything
to do with conditional requests, and I think it can be removed now that we
have `CommonMiddleware` as the standard place to set it.

--
Ticket URL: <https://code.djangoproject.com/ticket/27346>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 14, 2016, 8:15:14 AM10/14/16
to django-...@googlegroups.com
#27346: Stop setting the Content-Length header in ConditionalGetMiddleware
-------------------------------------+-------------------------------------
Reporter: Kevin Christopher | Owner: nobody
Henry |
Type: | Status: new
Cleanup/optimization |

Component: HTTP handling | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* type: Uncategorized => Cleanup/optimization
* needs_tests: => 0
* needs_docs: => 0


Comment:

It was [https://github.com/django/django/pull/6798#issuecomment-227557147
discussed briefly] when adding `Content-Length` to `CommonMiddleware`. We
didn't see much advantage to removing it at the time as
`ConditionalGetMiddleware` might be used without `CommonMiddleware`. I
don't have a strong feeling about it though.

--
Ticket URL: <https://code.djangoproject.com/ticket/27346#comment:1>

Django

unread,
Oct 14, 2016, 11:19:07 AM10/14/16
to django-...@googlegroups.com
#27346: Stop setting the Content-Length header in ConditionalGetMiddleware
-------------------------------------+-------------------------------------
Reporter: Kevin Christopher | Owner: Aleksandr
Henry | Sobolev
Type: | Status: assigned
Cleanup/optimization |

Component: HTTP handling | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Aleksandr Sobolev):

* owner: nobody => Aleksandr Sobolev
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/27346#comment:2>

Django

unread,
Nov 5, 2016, 6:20:14 AM11/5/16
to django-...@googlegroups.com
#27346: Stop setting the Content-Length header in ConditionalGetMiddleware
-------------------------------------+-------------------------------------
Reporter: Kevin Christopher | Owner: Martino
Henry | Pizzol
Type: | Status: assigned
Cleanup/optimization |

Component: HTTP handling | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Martino Pizzol):

* owner: Aleksandr Sobolev => Martino Pizzol


--
Ticket URL: <https://code.djangoproject.com/ticket/27346#comment:3>

Django

unread,
Nov 5, 2016, 6:38:01 AM11/5/16
to django-...@googlegroups.com
#27346: Stop setting the Content-Length header in ConditionalGetMiddleware
-------------------------------------+-------------------------------------
Reporter: Kevin Christopher | Owner: (none)

Henry |
Type: | Status: new
Cleanup/optimization |
Component: HTTP handling | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Martino Pizzol):

* owner: Martino Pizzol => (none)
* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/27346#comment:4>

Django

unread,
Nov 5, 2016, 6:55:46 AM11/5/16
to django-...@googlegroups.com
#27346: Stop setting the Content-Length header in ConditionalGetMiddleware
-------------------------------------+-------------------------------------
Reporter: Kevin Christopher | Owner:
Henry | adammalinowski
Type: | Status: assigned
Cleanup/optimization |

Component: HTTP handling | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by adammalinowski):

* status: new => assigned

* owner: (none) => adammalinowski


--
Ticket URL: <https://code.djangoproject.com/ticket/27346#comment:5>

Django

unread,
Nov 5, 2016, 8:02:08 AM11/5/16
to django-...@googlegroups.com
#27346: Stop setting the Content-Length header in ConditionalGetMiddleware
-------------------------------------+-------------------------------------
Reporter: Kevin Christopher | Owner: Adam
Henry | Malinowski
Type: | Status: assigned
Cleanup/optimization |

Component: HTTP handling | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Adam Malinowski):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/7476: PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/27346#comment:6>

Django

unread,
Nov 5, 2016, 8:13:40 AM11/5/16
to django-...@googlegroups.com
#27346: Stop setting the Content-Length header in ConditionalGetMiddleware
-------------------------------------+-------------------------------------
Reporter: Kevin Christopher | Owner: Adam
Henry | Malinowski
Type: | Status: assigned
Cleanup/optimization |
Component: HTTP handling | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/27346#comment:7>

Django

unread,
Nov 5, 2016, 8:36:51 AM11/5/16
to django-...@googlegroups.com
#27346: Stop setting the Content-Length header in ConditionalGetMiddleware
-------------------------------------+-------------------------------------
Reporter: Kevin Christopher | Owner: Adam
Henry | Malinowski
Type: | Status: assigned
Cleanup/optimization |
Component: HTTP handling | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Adam Malinowski):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/27346#comment:8>

Django

unread,
Nov 5, 2016, 11:34:43 AM11/5/16
to django-...@googlegroups.com
#27346: Stop setting the Content-Length header in ConditionalGetMiddleware
-------------------------------------+-------------------------------------
Reporter: Kevin Christopher | Owner: Adam
Henry | Malinowski
Type: | Status: assigned
Cleanup/optimization |
Component: HTTP handling | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/27346#comment:9>

Django

unread,
Nov 5, 2016, 5:25:11 PM11/5/16
to django-...@googlegroups.com
#27346: Stop setting the Content-Length header in ConditionalGetMiddleware
-------------------------------------+-------------------------------------
Reporter: Kevin Christopher | Owner: Adam
Henry | Malinowski
Type: | Status: closed
Cleanup/optimization |

Component: HTTP handling | Version: 1.10
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"37809b891eae2e73c7e80fbf5d8b9a7e86e82b54" 37809b89]:
{{{
#!CommitTicketReference repository=""
revision="37809b891eae2e73c7e80fbf5d8b9a7e86e82b54"
Fixed #27346 -- Stopped setting the Content-Length header in
ConditionalGetMiddleware.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27346#comment:10>

Reply all
Reply to author
Forward
0 new messages