Closed Bug 1221474 Opened 9 years ago Closed 9 months ago

incomplete chunked encoding error shows blank page (Chrome shows error)

Categories

(Core :: Networking: HTTP, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1531344

People

(Reporter: dietrich, Unassigned)

Details

(Keywords: DevAdvocacy, Whiteboard: [DevRel:P2])

URL that caused this: http://www.oregonlive.com

However, I'm sure it'll be fixed soon :P

Screenshot of Chrome: https://i.imgur.com/hOhRAyH.png

Firefox nightly and release on both desktop and mobile all show a blank white page.
Keywords: DevAdvocacy
Summary: incomplete chunked encoding error shows bank page (Chrome shows error) → incomplete chunked encoding error shows blank page (Chrome shows error)
Whiteboard: [DevRel:P2]
Component: General → Untriaged
Product: Firefox → Core
I have tested the reported issue on Windows 10 and OS X 10.12 on Firefox Release and latest Nightly builds (Chrome as well). I could not reproduce the issue on any platform. I will mark this as Resolved:WorksForMe. 

If anyone can still reproduce the issue, feel free to reopen it and provide more information.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Hi Stefan. Can you please say how you tested it? If you tested against the original URL, then please re-open it. To definitively close the issue, you'll need to recreate the scenario described and confirm that we no longer show a blank white page.
Flags: needinfo?(stefan.georgiev)
Hi Dietrich,

I've tested the issue with the provided details. I've visited the page with new profile and verified that nothing is broken. Page is opened and rendered without issue. Please provide more detailed information or STR on how to reveal the issue.
Flags: needinfo?(stefan.georgiev) → needinfo?(dietrich)
Yep, the website likely fixed the issue.

We need someone from necko team to take it from here. They'll know best how to construct the right conditions for re-creating the problem and make sure we're showing a neterror page.

Patrick, can you have someone on your team take a look?
Status: RESOLVED → REOPENED
Flags: needinfo?(dietrich) → needinfo?(mcmanus)
Resolution: WORKSFORME → ---
Flags: needinfo?(mcmanus) → needinfo?(jduell.mcbugs)
Not sure when we'll get to this.  If I see better steps to reproduce and/or more bug reports of this behavior it'll float to the top of the queue faster.
Flags: needinfo?(jduell.mcbugs)
Whiteboard: [DevRel:P2] → [DevRel:P2][necko-backlog]
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P1
Priority: P1 → P3
Moving from Core::Untriaged to Core::General https://bugzilla.mozilla.org/show_bug.cgi?id=1407598
Component: Untriaged → General

I believe this is because Firefox fails to require last-chunk in Transfer-Encoding: chunked. While other browsers mark transfers not containing such chunk as incomplete/failed, Firefox marks them as completed/success.

This is even mentioned in https://bugzilla.mozilla.org/show_bug.cgi?id=654577:

This bug is not about a failure to require a last-chunk.

Reproduction steps are as follows:

➜ cat chunked.txt
HTTP/1.2 200 OK
Connection: close
Content-Type: application/octet-stream; charset=binary
Transfer-Encoding: chunked

1
a
➜ od -a chunked.txt
0000000 H T T P / 1 . 2 sp 2 0 0 sp O K cr
0000020 nl C o n n e c t i o n : sp c l o
0000040 s e cr nl C o n t e n t - T y p e
0000060 : sp a p p l i c a t i o n / o c
0000100 t e t - s t r e a m ; sp c h a r
0000120 s e t = b i n a r y cr nl T r a n
0000140 s f e r - E n c o d i n g : sp c
0000160 h u n k e d cr nl cr nl 1 cr nl a cr nl
0000200
➜ nc -l 8000 < chunked.txt

Open localhost:8000 in Firefox
Hit CTRL+C in terminal

Chrome responds ERR_INCOMPLETE_CHUNKED_ENCODING, Firefox starts downloading and marks download as Completed

Severity: normal → S3
Component: General → Networking: HTTP
Severity: S3 → --
Priority: P3 → --
Whiteboard: [DevRel:P2][necko-backlog] → [DevRel:P2]

I tried to reproduce again, but nowadays we raise the error NS_ERROR_NET_PARTIAL_TRANSFER on the channel. The download is marked as failed as well. After doing some digging, it got probably fixed with Bug 1531344. Closing as duplicate of that.

One-line test server in bash: while [ 1 ]; do printf 'HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: application/octet-stream; charset=binary\r\nTransfer-Encoding: chunked\r\n\r\n1\r\na\r\n' | nc -Nl 8000; done

Status: REOPENED → RESOLVED
Closed: 7 years ago9 months ago
Duplicate of bug: 1531344
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.