Closed
Bug 1043256
Opened 11 years ago
Closed 11 years ago
Invalid encoding error reported when being redirected to traffic.outbrain.com
Categories
(Core :: Networking: HTTP, defect)
Core
Networking: HTTP
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: gerard-majax, Assigned: dragana)
References
Details
Attachments
(4 files, 9 obsolete files)
|
23.34 KB,
application/x-bzip
|
Details | |
|
326.54 KB,
application/x-bzip
|
Details | |
|
22.50 KB,
patch
|
gerard-majax
:
feedback+
|
Details | Diff | Splinter Review |
|
26.49 KB,
patch
|
dragana
:
review+
|
Details | Diff | Splinter Review |
[Blocking Requested - why for this release]: This is breaking user access to content.
STR:
0. Load a website that is using traffic.outbrain.com
1. Click on a link that gets handled by this provider
Expected:
Link is loaded properly
Actual:
An error page stating encoding issue is shown
A 100% reproductibility is for example on http://m.leparisien.fr/. Open an article, click on links at bottom of the page, it gets redirected through paid.outbrain.com
| Reporter | ||
Comment 1•11 years ago
|
||
Of course, no logcat output helps.
| Reporter | ||
Comment 3•11 years ago
|
||
I have never noticed how much this is used by at least french news websites. Ouest France is making use of this, and is hit by the bug.
Summary: Invalid encoding error reported when being redirected to paid.outbrain.com → Invalid encoding error reported when being redirected to traffic.outbrain.com
| Reporter | ||
Updated•11 years ago
|
Component: Gaia::System → Networking: HTTP
Product: Firefox OS → Core
| Reporter | ||
Comment 4•11 years ago
|
||
| Reporter | ||
Comment 5•11 years ago
|
||
| Reporter | ||
Comment 6•11 years ago
|
||
Attachment #8463860 -
Attachment is obsolete: true
| Reporter | ||
Comment 7•11 years ago
|
||
This is only happening on B2G, and on multiple devices.
| Assignee | ||
Comment 8•11 years ago
|
||
I am not sure can this be the same problem as Bug 1012917?
Flags: needinfo?(jduell.mcbugs)
Comment 9•11 years ago
|
||
This issue does occur on the latest 2.0 Flame, 2.1 Flame, and 2.1 Buri builds. An encoding error is recieved.
Environmental Variables:
Device: Flame Master
BuildID: 20140730124313
Gaia: b67ddd7d40b52e65199478b8d6631c2c28fdf41d
Gecko: b3cbce8a2b87
Version: 34.0a1 (Master)
Firmware Version: v122
User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0
Environmental Variables:
Device: Flame 2.0
BuildID: 20140730080807
Gaia: e8425788e0372fbbcc40387b799f0636c041fc14
Gecko: 20c472fc0ee3
Version: 32.0 (2.0)
Firmware Version: v122
User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0
Environmental Variables:
Device: Buri Master
BuildID: 20140730045709
Gaia: 25e998814ba89f30fe44cd2fdfbb44d160a04641
Gecko: 08c23f12a43e
Version: 34.0a1 (Master)
Firmware Version: v1.2device.cfg
User Agent: Mozilla/5.0 (Mobile; rv:34.0) Gecko/34.0 Firefox/34.0
An error that the page uses an "invalid or unsupported form of compression." is seen when reproducing this issue on the latest 1.4 Flame build. Listed separately in case the difference means more than just a wording change in more recent builds.
Environmental Variables:
Device: Flame 1.4
BuildID: 20140730110705
Gaia: 142953262d2cb031e3db217206edc3507580b0df
Gecko: 3c780088aae4
Version: 30.0 (1.4)
Firmware Version: v122
User Agent: Mozilla/5.0 (Mobile; rv:30.0) Gecko/30.0 Firefox/30.0
QA Whiteboard: [QAnalyst-Triage?]
status-b2g-v1.4:
--- → affected
status-b2g-v2.0:
--- → affected
status-b2g-v2.1:
--- → affected
Flags: needinfo?(jmitchell)
Keywords: qawanted
Comment 10•11 years ago
|
||
not a regression
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+
Flags: needinfo?(jmitchell)
Updated•11 years ago
|
QA Whiteboard: [QAnalyst-Triage+ → [QAnalyst-Triage+]
Comment 11•11 years ago
|
||
Hmm, the HTTP logs are huge, so I'm not positive I'm looking at the right HTTP transactions. But all of the requests to paid.outbrain.com URIs seem to not do redirects: instead they are replying with 200 (normal response) chunked gzipped replies, which seem to happen normally (OnDataAvailable called with 184 bytes of data, OnStopRequest is called with NS_OK)
I do see
converter removed 'gzip' content-encoding
in both the parent and child log--is it possible that we're trying unzip twice somehow for a chunked gzipped reply? I'm not sure how common those are. But I'm seeing the ChannelChild call OnDataAvailable with 184 bytes and OnStopRequest with NS_OK, too, so that seems fine.
Basically I'm not sure the log is capturing the error. The only channels with an error status in the log are error=804b0002 (NS_BINDING_ABORTED), which doesn't sound like it would cause the encoding error you mention. Could you try again, and/or give me the exact URI that you click?
I don't think this is bug 1012917 because that requres diverting the channel (which we only do for downloads or external content handlers), and this is allegedly a redirect.
Flags: needinfo?(jduell.mcbugs) → needinfo?(lissyx+mozillians)
| Assignee | ||
Comment 12•11 years ago
|
||
I looked at it.
we get data, decompressed them on parent then send them to child that tries to decompress them again.
so we need to suspend decompression on parent (or child). The proper way to do it should be solved (should be found...) in bug 1012917 (something similar we need to do for FTP over http (the bug that i was working on), there you mention that we should wait for bug 1012917 to find the way to do it properly?)
Flags: needinfo?(jduell.mcbugs)
Comment 14•11 years ago
|
||
Dragana,
Bug 1012917 covers more stuff than this, and doesn't need to be fixed for B2G right now. Can you make a fix that works just for this case (I'm guessing it's specific for chunked compressed replies over e10s), and we'll fix divert after that? (It may be the code that you already suggested in a previous bug, which I then told you to wait for bug 1012917 to add :) We want a quick, simple fix here if possible.
Assignee: nobody → dd.mozilla
Flags: needinfo?(jduell.mcbugs)
| Reporter | ||
Comment 15•11 years ago
|
||
Jason, can we check whether it is a problem for 1.3 ? This may be important for France market.
Flags: needinfo?(jsmith)
| Assignee | ||
Comment 18•11 years ago
|
||
| Assignee | ||
Updated•11 years ago
|
Attachment #8466952 -
Attachment is obsolete: true
| Assignee | ||
Comment 19•11 years ago
|
||
If we apply converters on parent, we need to clear content-encoding field from the header.
If a conversion could not be applied on parent, it will not be appied on child too? Because i am clearing the whole content-encoding field even if they are not applied because of of this check "if (gHttpHandler->IsAcceptableEncoding(val)) "?
Or should i just delete applied converters?
Attachment #8466958 -
Flags: review?(jduell.mcbugs)
Updated•11 years ago
|
status-firefox34:
--- → affected
tracking-e10s:
--- → +
OS: Gonk (Firefox OS) → All
Hardware: ARM → All
Comment 20•11 years ago
|
||
This issue does occur on Buri 1.3. An error page occurs when visiting traffic.outbrain.com.
Environmental Variables:
Device: Buri 1.3
BuildID: 20140721151227
Gaia: 23f55be856cef53c6604a6fe4aeb09061afbc897
Gecko: 9727017eabb9
Version: 28.0 (1.3)
Firmware Version: v1.2device.cfg
User Agent: Mozilla/5.0 (Mobile; rv:28.0) Gecko/28.0 Firefox/28.0
QA Contact: jmercado
Updated•11 years ago
|
| Reporter | ||
Comment 21•11 years ago
|
||
This may impact ZTE for France market, per comment 20 :(
Flags: needinfo?(vchen)
Flags: needinfo?(nwinter)
Updated•11 years ago
|
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
status-b2g-v1.3:
--- → affected
Flags: needinfo?(jmitchell)
Comment 22•11 years ago
|
||
Comment on attachment 8466958 [details] [diff] [review]
fix v1
Review of attachment 8466958 [details] [diff] [review]:
-----------------------------------------------------------------
Discussed w/Dragana.
We don't want to clear the HTTP header--that seems likely to break some addon or something eventually down the road. Better to figure out why we're trying to decode twice (only for chunked data? I suspect so) and do something internally to stop that from happening (IPDL flag to SendOnStartRequest, etc). I suspect that this is just happening for chunked replies (we would have gotten a lot of bug reports sooner otherwise), so we probably forgot to handle that special case. Also we need tests :)
Attachment #8466958 -
Flags: review?(jduell.mcbugs) → review-
Updated•11 years ago
|
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage+][lead-review+]
| Assignee | ||
Comment 23•11 years ago
|
||
It was not chunked data but data without content-type.
In case of data without content-type, the real listener is started later (onDataAvailable or OnStopRequest) but content-ending will be loaded.
That is why content sniffing worked for compressed data too.
I move loading of content-encoders into content sniffer(if it is used) so that it is always after OnStartRequest. And i changed content sniffer to be able to detect content type even if data is encoded.
Attachment #8466958 -
Attachment is obsolete: true
Attachment #8468351 -
Flags: review?(jduell.mcbugs)
Updated•11 years ago
|
Flags: needinfo?(nwinter)
| Reporter | ||
Comment 24•11 years ago
|
||
I just tested this patch on my Nexus S, and it does the job :)
Flags: needinfo?(dd.mozilla)
| Reporter | ||
Comment 26•11 years ago
|
||
Dragana, do you think this patch could be applied to v1.3 ? Partner may be interested in fixing this, since it's affecting v1.3 recently launched in France and that there seems to be quite a couple of users of this in french website.
Flags: needinfo?(nwinter)
Flags: needinfo?(dd.mozilla)
Comment 27•11 years ago
|
||
Comment on attachment 8468351 [details] [diff] [review]
fix 2
Review of attachment 8468351 [details] [diff] [review]:
-----------------------------------------------------------------
(jduell asked me to take a look at this patch)
I'm review+ on this with just one minor little nit. Looks clean and clear and it provides a test case!
::: netwerk/streamconv/converters/nsUnknownDecoder.cpp
@@ +371,5 @@
> {
> NS_ASSERTION(mContentType.IsEmpty(), "Content type is already known.");
> if (!mContentType.IsEmpty()) return;
>
> + const char* testData = (const char*)mBuffer;
This should be converted to a C++ish cast.
| Assignee | ||
Comment 28•11 years ago
|
||
Thanks Daniel for the review. this is with the fix.
Attachment #8468351 -
Attachment is obsolete: true
Attachment #8468351 -
Flags: review?(jduell.mcbugs)
Attachment #8471432 -
Flags: review?(daniel)
| Assignee | ||
Comment 29•11 years ago
|
||
Here is a bit changed patch that complies with v1.3.
Can somebody test.
I have removed the test from this patch because it is based on another test that is not in v1.3. I can add it if we need it.
| Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(dd.mozilla)
| Assignee | ||
Updated•11 years ago
|
Attachment #8471432 -
Flags: review?(daniel)
| Assignee | ||
Comment 30•11 years ago
|
||
just a small fix.
Attachment #8471461 -
Attachment is obsolete: true
| Assignee | ||
Comment 31•11 years ago
|
||
Attachment #8471432 -
Attachment is obsolete: true
Attachment #8471642 -
Flags: review?(daniel)
| Assignee | ||
Updated•11 years ago
|
Attachment #8471642 -
Flags: review?(daniel)
| Assignee | ||
Comment 32•11 years ago
|
||
just small changes
Attachment #8471642 -
Attachment is obsolete: true
Attachment #8471719 -
Flags: review?(daniel)
| Assignee | ||
Comment 33•11 years ago
|
||
this is patch with small changes so that it is compiling with v 1.3.
Attachment #8471641 -
Attachment is obsolete: true
Flags: needinfo?(lissyx+mozillians)
| Assignee | ||
Comment 34•11 years ago
|
||
| Reporter | ||
Comment 35•11 years ago
|
||
(In reply to Dragana Damjanovic from comment #33)
> Created attachment 8471724 [details] [diff] [review]
> fix for v 1.3
>
> this is patch with small changes so that it is compiling with v 1.3.
Thanks, I'm rebuilding a v1.3 on my Flame to test this!
Flags: needinfo?(lissyx+mozillians)
| Reporter | ||
Comment 36•11 years ago
|
||
Comment on attachment 8471724 [details] [diff] [review]
fix for v 1.3
That also fixes the issue on my Flame after applying it to v1.3 :)
Attachment #8471724 -
Flags: feedback+
Comment 37•11 years ago
|
||
Comment on attachment 8471719 [details] [diff] [review]
fix v2
Review of attachment 8471719 [details] [diff] [review]:
-----------------------------------------------------------------
::: netwerk/protocol/http/nsHttpChannel.cpp
@@ +928,5 @@
> + if (!unknownDecoderStarted) {
> + nsCOMPtr<nsIStreamListener> listener;
> + nsISupports *ctxt = mListenerContext;
> + rv = DoApplyContentConversions(mListener, getter_AddRefs(listener), ctxt);
> + if (NS_FAILED(rv)) return rv;
Maybe you can fix this line while you're at it? Add braces + newline I mean.
Attachment #8471719 -
Flags: review?(daniel) → review+
| Assignee | ||
Comment 38•11 years ago
|
||
Thanks Daniel.
Attachment #8471719 -
Attachment is obsolete: true
Attachment #8472490 -
Flags: review+
| Assignee | ||
Comment 40•11 years ago
|
||
| Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 41•11 years ago
|
||
I don't see Daniel listed as a Necko peer. Is he?
https://wiki.mozilla.org/Modules/Core#Necko
Keywords: checkin-needed
Comment 42•11 years ago
|
||
Ryan--thanks for noticing! :)
Necko policy is that any necko peer can delegate a review to someone. I'm fine with Daniel having done the review here.
But thanks so much for doing your best to keep random elements from landing code in our part of the tree :) I really do appreciate it.
Keywords: checkin-needed
Comment 43•11 years ago
|
||
Flags: in-testsuite+
Keywords: checkin-needed
Comment 44•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Updated•11 years ago
|
Flags: needinfo?(nwinter)
Updated•11 years ago
|
blocking-b2g: 2.1? → ---
Updated•11 years ago
|
Flags: needinfo?(vchen)
You need to log in
before you can comment on or make changes to this bug.
Description
•