#28786: Content-Length mismatch on Chrome
-------------------------------------+-------------------------------------
Reporter: spudnica | Owner: nobody
Type: Uncategorized | Status: new
Component: Core (Other) | Version: 1.11
Severity: Normal | Resolution:
Keywords: content-length, | Triage Stage:
commonMiddleware, development- | Unreviewed
server |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Old description:
> Hi!
>
> After updating to Django 1.11 I cant display pages in Chrome, due to
> error printed in Chrome console: net::ERR_CONTENT_LENGTH_MISMATCH
>
> The above error does not occur in Mozilla or IE. When I delete lines
> responsible for Content-Length header from CommonMiddleware error
> disappears and my site works just fine.
>
> Its not just mine Chrome, I tested issue on few PCs.
New description:
Hi!
After updating to Django 1.11 I cant display pages in Chrome, due to error
printed in Chrome console: net::ERR_CONTENT_LENGTH_MISMATCH
The above error does not occur in Mozilla or IE. When I delete lines
responsible for Content-Length header from CommonMiddleware error
disappears and my site works just fine.
Its not just mine Chrome, I tested issue on few PCs.
--
Comment (by spudnica):
Replying to [comment:2 Tim Graham]:
> I think we'll need more details about how to reproduce the problem.
1. I guess the issue is related to way that content-length is calculated.
If I manually set content-length to match particular page I request for, I
am able to open this in Chrome. It seems that str(len(response.content))
is not returning proper reponse length i CommonMiddleware for me and
firefox was just ignoring it.
2. If I order CommonMiddleware at first place in my middlewares list, site
is working properly, though it is against reccommendations in Django docs
guide Middleware ordering.
--
Ticket URL: <https://code.djangoproject.com/ticket/28786#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.b480725126ca48148a1b337bf2b8a285%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.