Firefox – Fix parsing of content-length http3 header
phabricator.services.mozilla.com
phabricator.services.mozilla.com
if (contentLengthStart == -1) {
// There is no content-Length.
return;
}
That's the same flow it would have taken with the case sensitive code.I am an HTTP/1.1 dinosaur. Is chunked transfer encoding no longer a thing in HTTP/3? It used to be a valid reason to omit Content-Length.
IIRC HTTP/2 and HTTP/3 are essentially always chunked. I would expect a missing content-length to be completely valid.
For HTTP/1.1, a stream where the length is not known upfront required the usage of chunked encoding. With HTTP/2 and /3 that encoding is no longer required since the underlying protocol already support framing and contains and end-of-stream information.
"I'm just a random kibbitzer, so my apologies if this is off-base, but... isn't an even more fundamental problem here that the code is doing a naive string-based search in the first place? For example, I believe this is a valid HTTP header block that could be passed into this code:
GET / HTTP/1.1\r\nHost: example.com\r\nCookie: foo="Content-Length: 100"\r\n\r\n (In particular, GET requests normally don't have a content-length header at all, since the default if none is present is to assume an empty body.)
Wouldn't this cause the code to compute the wrong body length and break things?"
[edited, link was to this same discussion]
Very interesting, is that comment inserted automatically by an IDE?
* valgrind (https://valgrind.org/): Contains a lot of tools
* Heaptrack (https://apps.kde.org/heaptrack/): For memory allocation analysis
* KCachegrind (https://apps.kde.org/kcachegrind/): For call graph vizualisations
* ELF Dissector (https://apps.kde.org/elf-dissector/): For analysis of binary files/dependencies
* Massif-Visualizer (https://apps.kde.org/massif-visualizer/): Valgrind massif visualiser
* Gammaray (https://www.kdab.com/development-resources/qt-tools/gammaray...): Tool to analysis the current state of a Qt project a bit like you would do with firefox inspector.
How is that funny?
For a greenfield component I do kind of agree though. I wonder does Mozilla still have the in-house Rust expertise for something like that after the layoffs?
I'm not sure why it's not used here.
Naturally most of it isn't free beer.
Plenty of nice tooling like Purify, Insure++ and V-Tune exist since decades.
https://lobste.rs/s/zcjtv2/1749908_infinite_loop_http3_hangs...
> [Q] Do I understand from this that Mozilla can just update my browser settings remotely without my updating‽
> [A] Yes. This is part of the “Remote settings” service, which we can use to ship or unship features (or gradually) or recover from breakage (like here!). We mostly use it as a backend for Firefox Sync and certificate revocation lists. Technically, we could also ship a new Firefox executable and undo / change settings, but that would realistically take many more hours. Needless to says, every “large” software project has these capabilities.
This is new to me. Can anyone tell me which other "large" projects have this capability?
I wonder if this is to blame?
In any case, this is incredibly sketchy behavior for a "user-empowering", "privacy focused" browser.
I found some detailed information on Mozilla's website [1] and I have three entries about RemoteSettings in about:config.
app.normandy.startupRolloutPrefs.browser.topsites.useRemoteSetting
browser.topsites.useRemoteSetting
browser.urlbar.quicksuggest.remoteSettings.enabled
I turned them to false.
This [2] explains what Normandy is.
[1] https://firefox-source-docs.mozilla.org/services/settings/in...
[2] https://firefox-source-docs.mozilla.org/toolkit/components/n...
I'd say that all popular apps (Android/iOS) have such functionality. Most will probably use it for A/B testing, but technically you could change anything you'd like with it.
Apart from the companies creating their own implementations [0], popular services I have seen include Optimizely [1] and Firebase Remote Config [2].
[0]: https://engineering.fb.com/2014/01/09/android/airlock-facebo...
[1]: https://www.optimizely.com/products/intelligence/full-stack-...
FWIW I maintained a popular chrome extension (100k weekly users) and I eventually had to add an extensive set of chicken bits pulled from my server multiple times a day. Why? Because chrome updates take over a day to propagate and the extension could regularly break when webdevs made frontend changes to the websites my end users visited. It simply wasn't feasible to ask end users to manually pull a chrome update every time this happened (not to mention that chrome's extension store is designed to make this very hard.) I added an option to disable it but as far as I know none of my users turned that on.
Not exactly the same but most modern hardware has equivalent functionality where they can flip 'chicken bits' in the hw to disable various features in response to regressions - stuff like spectre or meltdown is a good example. Naturally that is instead flipped by OS or firmware updates, but considering those come down across the wire automatically now, it's basically the same idea.
I completely agree that in the current case resetting it remotely is the easiest solution for both parties. However, it is probably the first time many users learned something like this exists. One would think an open browser promoting user empowerment would have more transparency on this feature and how it can be controlled.
I would be very surprised if they did. The Firefox development workflow does not map very well onto Github.
> Github issues are nowhere near usable for a large product such as gecko/firefox
I have huge doubts about that. Looking at the development of Servo on github was beautiful, the colored tags, the PR views, the activity stats, the reviews diffs, the wikis, everything about it was much more readable than it is on Bugzilla/phabricator IMHO. https://github.com/servo/servo The same can be said currently about webrender.
About scale, github is battletested, for Example Rust is an example of a large scale repo with a LOT of activity (~has more weekly commits than gecko-dev) so the premise Github issues are nowhere near usable for a large product seems false. What idiosyncrasies could mozilla devs have that are immutable and that make them so much different from large projects developped on github? You specifically mention issues: Github can do meta-issues, can auto closes issues after PR merge, has bidirectional PR/issues references, can autoclose issues on markdown checklist check, etc etc and if you couldn't fit into existing github features, I'm pretty sure you could totally solve your issues with Actions such as https://github.com/marketplace/actions/dependent-issues Also github is accomodating, when the Apache foundation migrated to github they were open to do changes to the platform to facilitate Apache needs, cf: https://github.blog/2019-04-29-apache-joins-github-community...
In addition to my belief that github can be better or at least as good as buzilla, if gecko migrated to github, it would attract order of magnitudes more open source contributions because of the lower barrier to entry and to familiarity (also bugzilla is awful on smartphones) You really think you should seriously consider the migration.
So you may be right, but I'm not a MoCo employee so I won't be part of any decision about that. Also consider the cost of moving all the tooling that exists to github (in the specific context of gecko): a migration needs to bring a lot of benefits, especially if you take into account that gecko's canonical repo is a mercurial one, not git.
Improving onboarding for new contributors would be nice for sure, but "order of magnitude more contributions" seems optimistic. I mostly expect there would be tons of low quality issues filed.
Worse of all case insensitivity, not all languages have the same casing rules, so you just ask for bugs that only appear when your user is not US American.
They should introduce some functional programming into this!
And the implementation of HTTP/3, that was Google QUIC, is required for chasing Chrome's "fire and motion".
The right question is, does pouring resources into their own web page align with their mission statement?
https://blog.mozilla.org/press/2005/08/mozilla-foundation-fo...
> The Mozilla Corporation is a taxable subsidiary that serves the non-profit, public benefit goals of its parent, the Mozilla Foundation, and the vast Mozilla community.
The Mozilla Corporation is a wholly owned subsidiary of the Foundation. The constructs are for regulatory and financial hand waving.
However, since its sole shareholder is a non-profit Foundation, it is able to invest differently than a typical corporation.
For example, there is no pressure from the Foundation to "maximize shareholder value."
This is much more obvious with the web. Everyone uses Chromium, so the web as a standard is now effectively whatever Google decides it is. See Widevine.
FWIW I don't see anything specific wrong with QUIC. I'm quite excited about it and think it will be good for the internet.
Is it really Apple's Donald Trump presidency? Google's Democratic Backsliding and Facebook's Climate Change?
I don't think it's useful to distinguish "big tech" in this regard from say, the Military Industrial Complex's outsize influence on our world, or the way Malls bulldozed America's distinctive local businesses, or the way Hollywood decides how much of the world imagines things.
And I especially don't see value in assigning them name ownership of things that were done by large numbers of individuals working together just because it so happens that you find it easier to remember "Google" than say Jana Iyengar or Martin Thomson (editors of QUIC, neither of whom work for Google).
Unlike the W3C corporations can't actually participate in the IETF, which is a human activity and so is done by humans. Corporations can, and do, pay their employees to participate, but everybody is welcome and, as outfits like EDCO discovered, just flooding the IETF with bodies doesn't achieve anything except make you look stupid. (EDCO wanted TLS 1.3 to have defective encryption because it would be easier than doing their jobs properly).
But do you think if QUIC wasn't exactly what they wanted, Google would have signed off on it? I don't think so. I think they would have kept using SPDY. So I don't see much difference between QUIC coming from the IETF or Google itself, since I'm assuming the final output artifact is the same.
At the end of the day all I'm trying to say is we should be wary of the tech choices of big companies. Most websites probably don't need HTTP/2+, a CDN, etc, and the complexity that comes with it. Most startups probably don't need microservices. Most web apps probably don't need more than Mithril.js (or HTML forms for that matter). I'm not arguing against things existing or being good, just that it's important to be cautious buying in wholesale and assuming the way large companies do things is the way everyone should do things. If you're not careful you can end up in a place where the simple option is no longer available. For example it's basically impossible to make a web browser with a small team now.
I'm excited about HTTP/3 as long as they don't try to take HTTP/1.1 away from me.
What are they rewriting?
> catch up with Chrome
The standards driven development that Mozilla fostered in the aughts is mostly gone.
Today the standards are mostly written by the dominant browser and everyone else just plays catch up.