News for hackers. Stuff that matters.
Re:Two years of Rust by mmstick on Monday May 15, 2017 @04:49PM (#14344980)
You might like to know that I've had great success with full stack web development using Rust. My website (https://mmstick.tk) is hosted with the Rocket (https://rocket.rs/overview/) web framework and operates as a fully static binary with 100% Rust code. I've even got HTTPS and Brotli compression.
Re:Two years of Rust by dang on Monday May 15, 2017 @10:21PM (#14346926)
We detached this ludicrous flamewar from https://news.ycombinator.com/item?id=14344760 and marked it off-topic.

You repeatedly posted uncivilly in these comments. That's a bannable offense on HN, so please don't do it again, regardless of how wrong you think others are.

Re:Two years of Rust by winteriscoming on Monday May 15, 2017 @11:11PM (#14347101)
What a mess! Came to this thread to read about Rust and its progress and this has devolved into a useless discussion about some person's website, who seems to consider that he/she is doing all the right things and the rest of the technical community is stupid.

Completely lost track of what thread I was reading.

Re:Two years of Rust by dang on Tuesday May 16, 2017 @01:10AM (#14347505)
That's why your friendly janitorial staff detach these and mark them off topic so they fall to the bottom. That way you only see them when there's nothing else to read.

One of these years we might implement a "More" link at the bottom of threads so you have to go to a second page to see them at all.

Re:Two years of Rust by kccqzy on Monday May 15, 2017 @05:33PM (#14345312)
When you are presenting a site saying it's a "great success," perhaps it doesn't help that it breaks in 40% of browsers.
Re:Two years of Rust by eridius on Monday May 15, 2017 @05:02PM (#14345089)
Your site is returning brotli-encoded data even when the browser doesn't support it. At least, I assume that's what it's doing, because the return value is complete garbage and it contains a "Content-Encoding: br" header.
Re:Two years of Rust by mmstick on Monday May 15, 2017 @05:06PM (#14345119)
Naturally. Since moving to HTTPS, I have dropped support for gzip, and I will not be re-adding it. There is no benefit in continuing to retain legacy gzip support. Brotli can compress and decode faster than gzip, and it produces smaller file sizes. That Safari still doesn't support Brotli isn't my problem. It's Apple's problem. I'm not going to be yet another site that condones stagnant progress when everyone else has already supported it for more than a year. More sites should drop gzip support to force Apple to add support for Brotli in Safari.
Re:Two years of Rust by kcorbitt on Monday May 15, 2017 @05:20PM (#14345216)
If I were focused so unapologetically on purity over pragmatism at the expense of playing nice with the wider web ecosystem, I would perhaps think twice before holding my site up as a positive example of the state of web development with Rust. You may end up doing more harm than good in the PR department. :)
Re:Two years of Rust by mmstick on Monday May 15, 2017 @05:29PM (#14345292)
I see it as more of an Apple problem. Everyone else's web browser works fine, but Apple's doesn't. The main reason why companies like Apple still don't support Brotli even though the competition has supported it for more than a year now is because too many sites are focused on carrying legacy support for unsupported platforms like Safari. If more sites dropped support for legacy software, Apple would be forced to implement Brotli support and then everyone could benefit.
Re:Two years of Rust by eridius on Monday May 15, 2017 @05:40PM (#14345368)
Have you filed a bug report asking Apple to support Brotli (https://bugreport.apple.com)?

And it's not just Safari. I think it's safe to say the overwhelming majority of software that issues HTTP requests does not support Brotli. And you're also not following the HTTP spec. Safari sends the Accept-Encoding header with a value of "gzip, deflate". If you're unwilling to support either of those, and unwilling to return an uncompressed response, then you SHOULD return a 406 (Not Acceptable) instead of just blindly returning Brotli-encoded data to a client that doesn't understand it.

Re:Two years of Rust by mmstick on Monday May 15, 2017 @05:48PM (#14345439)
I don't use Apple products, nor am I user of Safari. It's not in my interest to request for Brotli support in products that I do not use.

> I think it's safe to say the overwhelming majority of software that issues HTTP requests does not support Brotli. And you're also not following the HTTP spec.

Again, I do not support HTTP! The website is HTTPS-exclusive. HTTP is basically a legacy protocol at this point. Every website should be encrypted.

> If you're unwilling to support either of those, and unwilling to return an uncompressed response, then you SHOULD return a 406 (Not Acceptable) instead of just blindly returning Brotli-encoded data to a client that doesn't understand it.

I may do just that then.

Re:Two years of Rust by eridius on Monday May 15, 2017 @05:55PM (#14345483)
> It's not in my interest to request for Brotli support in products that I do not use.

You've already positioned yourself as trying to take a principled stand against software that doesn't support Brotli in the hopes of convincing the software authors to add support for Brotli. Now you're saying you don't care whether software you don't use supports Brotli. These two positions contradict each other, and if you really don't care about software you don't use, then why are you so dead set against serving up uncompressed content to that software?

> Again, I do not support HTTP!

You completely missed the point. I know your site doesn't support HTTP. But HTTPS is generally understood to be part of the umbrella of "HTTP". It is in fact literally the same protocol (well, for HTTP/1.1; HTTP/2 is a brand new protocol and irrelevant for this discussion), just wrapped in SSL.

> I may do just that then.

Just so we're clear, your site currently does not work, and will continue to not work, with tools like `curl` or `wget`, or nearly all other non-browser tools people have written.

Re:Two years of Rust by mmstick on Monday May 15, 2017 @06:14PM (#14345632)
> You've already positioned yourself as trying to take a principled stand against software that doesn't support Brotli in the hopes of convincing the software authors to add support for Brotli. Now you're saying you don't care whether software you don't use supports Brotli. These two positions contradict each other, and if you really don't care about software you don't use, then why are you so dead set against serving up uncompressed content to that software?

I'm not sure where you think the contradiction is. That I do not support web browsers that don't support Brotli should already tell you that I don't care if they support Brotli or not! If there is no support, there is no support! Doesn't effect me.

> You completely missed the point. I know your site doesn't support HTTP. But HTTPS is generally understood to be part of the umbrella of "HTTP". It is in fact literally the same protocol (well, for HTTP/1.1; HTTP/2 is a brand new protocol and irrelevant for this discussion), just wrapped in SSL.

Basically completely irrelevant to what's being discussed here. I do not support non-SSL HTTP connections. That is all!

> Just so we're clear, your site currently does not work, and will continue to not work, with tools like `curl` or `wget`, or nearly all other non-browser tools people have written.

Naturally. I would prefer to not have anyone using these tools on my server.

Re:Two years of Rust by eridius on Monday May 15, 2017 @06:23PM (#14345695)
> That I do not support web browsers that don't support Brotli should already tell you that I don't care if they support Brotli or not! If there is no support, there is no support! Doesn't effect me.

You had to go out of your way to break support for these browsers. Literally every HTTP package (including Rocket) out of the box handles uncompressed responses. You had to modify it to add always-on Brotli encoding.

> I do not support non-SSL HTTP connections.

Why do you keep repeating this? That's completely irrelevant to the discussion at hand. Nothing about this discussion has anything to do with whether or not the HTTP protocol is wrapped in SSL.

> Naturally. I would prefer to not have anyone using these tools on my server.

So, you want a web site that completely breaks HTTP such that only works with a handful of browsers and doesn't work with the probably tens or hundreds of thousands of pieces of other software that speaks HTTP.

Why?

Re:Two years of Rust by mmstick on Monday May 15, 2017 @06:48PM (#14345871)
> You had to go out of your way to break support for these browsers. Literally every HTTP package (including Rocket) out of the box handles uncompressed files. You had to modify it to add always-on Brotli encoding.

I did not have to go out of my way to 'break support for these browsers'. All I did was replace the gzip-compression code in my page cacher with brotli-compression code. In other words, I went from always-on Gzip encoding to always-on Brotli encoding! I have never supported serving uncompressed files! The web browsers I care about (Firefox, Chrome) support Brotli, and that's all I care about! There is no purposeful breaking of web browsers. That's just persecution complex talk.

> Why do you keep repeating this? That's completely irrelevant to the discussion at hand. Nothing about this discussion has anything to do with whether or not the HTTP protocol is wrapped in SSL.

You're the one that keeps bringing up that the only difference between HTTP and HTTPS is that HTTPS is HTTPS with SSL. I am merely responding to your comment that your comment about them doesn't matter! What does matter is that my website only supports the HTTPS protocol, not HTTP. The web server only listens on port 443 with TLS enabled.

> So, you want a web site that completely breaks HTTP such that only works with a handful of browsers and doesn't work with the probably tens or hundreds of thousands of pieces of other software that speaks HTTP.

This is nothing more than pure trolling. All major web browsers support Brotli over HTTPS. Apple's WebKit is the only man out, and they are, at best, a minority on the web. Firefox supports it, Chrome supports it, and Edge supports it. Even if Edge didn't support it, the fact that Firefox and Chrome support it is more than enough for me. Other browsers are just bonuses.

Furthermore, yet again, I do not have a HTTP server, so there is no HTTP here to break! HTTPS is implemented to spec, HSTS headers and all! My website is meant to be viewed by people, not machines. In addition, as the web is moving to being HTTPS-exclusive, it's about time that you start getting used to it. You're wasting your time.

Re:Two years of Rust by eridius on Monday May 15, 2017 @06:58PM (#14345945)
Always-on gzip encoding is also technically broken, it's just far more likely to be supported out of the box by other HTTP clients.

> What does matter is that my website only supports the HTTPS protocol

No, that has literally no bearing on this discussion about your use of Brotli encoding. You're weirdly fixated with this, but it's completely irrelevant.

> This is nothing more than pure trolling.

Do you normally go out of your way to insult people who are trying to have a discussion with you? Because that's what calling someone a troll is.

> All major web browsers support Brotli over HTTPS

Why doesn't Safari count in your eyes as a major browser? Or perhaps more interestingly, why doesn't iOS Safari count? Are you really ok with your site not working for 100% of iOS users?

> In addition, as the web is moving to being HTTPS-exclusive, it's about time that you start getting used to it. You're wasting your time.

Why do I have to keep repeating this? HTTPS has literally nothing to do with this discussion. You keep bringing it up over and over again as if it's somehow meaningful, but all it tells me is that you literally have no idea what you're talking about.

[dead]
Re:Two years of Rust by eridius on Monday May 15, 2017 @08:36PM (#14346493)
I already explained this in another comment almost an hour ago (https://news.ycombinator.com/item?id=14346188). Brotli works perfectly fine over HTTP. The only difference between HTTP and HTTPS here is Chrome does not include "br" in the Accept-Encoding header for HTTP. But it will still handle a Content-Encoding of "br" just fine over HTTP.

> One of the major reasons for me moving my website to HTTPS is so that I could use Brotli compression.

Why do you care so much about this particular compression format?

> Otherwise, Firefox and Chrome will merely get a content encoding error page because br is an unknown encoding format when using HTTP!

You clearly did not test this, because Chrome interprets Brotli responses just fine over HTTP. I wager Firefox does too, but I'm not about to install Firefox just to test.

> You're wrong, and Google engineers are right. End of story.

Google engineers are right, but you are not right. You don't understand what the Google engineers are saying. The link you provided specifically has to do with the Accept-Encoding header and not Brotli support as a whole.

> My target audience consists of Linux users using either Chrome or Firefox.

I still don't understand why you're intentionally breaking the open web. It makes no sense.

> No matter how many times I explain things to you, you never seem to get it through your head.

You should try actually listening. You keep explaining things that are factually wrong or completely irrelevant. You seem to not actually understand HTTP, HTTPS, Content-Encodings, or even the idea of the open web in general. And you're going out of your way to break 99% of tools out there for no discernible reason. Why do you love Brotli so much that you're willing to break HTTP just to use it?

[dead]
Re:Two years of Rust by dang on Monday May 15, 2017 @10:33PM (#14346974)
The bulk of the responsibility for this ludicrous flamewar is yours. You became increasingly uncivil and spatty in this thread, and proliferated reams of tit-for-tat filler.

This is the sort of argument that gets a few combatants hot and bothered and clogs up the site with tedium for everyone else. We ban accounts that do this, so please make sure it doesn't happen again. HN threads are for good conversation, and there's no worse conversation than this kind of bickering.

Re:Two years of Rust by jacquesm on Monday May 15, 2017 @10:15PM (#14346898)
You really should stop with the personal attacks.
Re:Two years of Rust by eridius on Monday May 15, 2017 @10:16PM (#14346902)
> Brotli does not work over HTTP. Period. It doesn't work, and you have yet to prove that it works.

I really do not appreciate you continually calling me a liar (since I've told you in no uncertain terms that I personally have tested this behavior), especially since all you're doing is an appeal to authority ("Google engineers!") based on a misunderstanding of the issue at hand. You keep claiming you have "evidence", but all your "evidence" proves is that you need to work on your reading comprehension skills, because those pages do not say what you think they say.

> You are basically calling Google and each of these authors that I've linked as liars

Let me try this again:

YOU DO NOT UNDERSTAND THIS ISSUE. YOU DO NOT UNDERSTAND HOW CONTENT ENCODINGS WORK OR WHAT EFFECT HTTPS HAS ON BROTLI. I AM NOT CALLING THEM LIARS, I AM CALLING YOU INCREDIBLY IGNORANT.

I am done with this conversation. I am not going to respond to any more of your comments. You don't understand basically any part of what's going on here, but you think you do and you won't even acknowledge the possibility that you are wrong. You're also misinterpreting nearly everything I say, because you're not actually reading my damn comments, you're just skimming them looking for things you can argue against. Case in point, your sentence that starts with "First you said it was 40%"; I was talking about tools that speak HTTP, which was extremely clearly from context, and you're completely misinterpreting that as browsers, and what's more you're even putting words in my mouth (literally nowhere did I say 40%).

Re:Two years of Rust by dang on Monday May 15, 2017 @10:30PM (#14346953)
> You are an ignorant fool.

That is a serious breach of HN's civility rule and the sort of thing we ban people for. When someone is provocatively repeating wrong statements (or appears to be) and is getting increasingly rude, the way to deal with that is not to lose your own cool, it's to realize that there's no win in this and just leave it.

A.k.a. don't feed the trolls, it takes two to tango, two wrongs don't make a right, and sundry other things our mothers told us.

Re:Two years of Rust by eridius on Monday May 15, 2017 @10:42PM (#14347006)
I've deleted the offending line. But I admit to being a little surprised that "ignorant fool" is considered a serious breach. That honestly seems fairly tame to me. I was looking for a phrase that meant that not only are they ignorant, but they're either unwilling or unable to recognize this. But I suppose I can believe that other people may read more into the phrase that I intended.
Re:Two years of Rust by dang on Monday May 15, 2017 @10:48PM (#14347033)
Dr. Dang recommends full recalibration of your internet provocation meter. "Ignorant fool" is well into the red!
Re:Two years of Rust by nercury on Monday May 15, 2017 @08:26PM (#14346440)
> I do not support HTTP!

You are, in fact, right. But I advise you to read about HTTPS here, so you can more clearly understand the points others are making: https://en.wikipedia.org/wiki/HTTPS.

Re:Two years of Rust by jacquesm on Monday May 15, 2017 @07:10PM (#14346022)
I'll bet if your food depended on that 40% you'd fix it in a heartbeat.
Re:Two years of Rust by mmstick on Monday May 15, 2017 @07:34PM (#14346151)
I highly doubt that anyone depends upon a personal blog for food.
Re:Two years of Rust by jacquesm on Monday May 15, 2017 @08:26PM (#14346436)
So there's your answer: you really don't care.

I also don't depend on my blog for food. But I do care and if this were a customer project or something commercial you'd be dead in the water. That's a friendly way of saying that your opinion on what is 'standard' really doesn't count for much with me. You've polluted this thread with I don't know how many comments essentially shouting down each and every patient and restrained effort to teach you something but you won't take a hint.

Re:Two years of Rust by mmstick on Monday May 15, 2017 @08:52PM (#14346552)
Maybe you can explain to me why I am supposed to cater to other's whims as if my personal blog was a commercial project. It's not. Nobody is trying to teach me things here. They are simply demanding that I do what I have already clearly expressed that I am not going to do. This is my personal blog, not yours. I get to set the rules, not you. Perhaps you can take a hint and not demand others to do things for you even after they've expressed that they don't want to? If anyone is polluting the thread, it's your kind. Snarky, combative, argumentative, and ignorant. If you want to be an asshole, you'll get what you ask for from me.
Re:Two years of Rust by flukus on Monday May 15, 2017 @08:18PM (#14346387)
> even though the competition has supported it for more than a year now is because too many sites are focused on carrying legacy support for unsupported platforms like Safari.

That says it all really. Unfortunately it also seems to be a common attitude in the rust community.

Something doesn't become legacy just because a newer option has been available for a year.

Re:Two years of Rust by steveklabnik on Monday May 15, 2017 @08:29PM (#14346453)
> Unfortunately it also seems to be a common attitude in the rust community.

Eh, maybe in some segments, but I don't think that's the majority culture. See https://github.com/rust-lang/rfcs/pull/1985 for something extremely relevant to the discussion here, heh.

Re:Two years of Rust by gue5t on Monday May 15, 2017 @05:38PM (#14345353)
GNOME's, Xfce's, suckless', and many other web browsers are based on Webkit (WebKit2GTK+ or other ports) as well, and as far as I know none of them yet support brotli.

wget and curl both also fail to decompress your site's contents.

Same problem in netsurf, lynx, and links.

Re:Two years of Rust by mmstick on Monday May 15, 2017 @05:47PM (#14345432)
This is because I don't have a HTTP website! The website is HTTPS-exclusive. If your tool does not support HTTPS, it will certainly not work on my website.

> wget and curl both also fail to decompress your site's contents.

I'd consider this a good thing, actually.

Re:Two years of Rust by thristian on Monday May 15, 2017 @11:12PM (#14347108)
All the tools mentioned in the comment you're responding to support HTTPS just fine.
Re:Two years of Rust by eridius on Monday May 15, 2017 @05:24PM (#14345253)
I'm not saying you should support gzip. I'm saying you're sending Brotli-encoded data even when the browser doesn't support it, which results in the browser showing what looks like effectively random bytes. You need to respect the Accept-Encoding header.
Re:Two years of Rust by mmstick on Monday May 15, 2017 @05:32PM (#14345304)
That would require that I cache both a gzip and brotli variant of each page and content that is requested. I see no reason to support gzip just because a single company has refused to implement support for Brotli. Firefox, Chrome and Edge all support Brotli. Safari is the one man out. Apple needs more complaints about the lack of Brotli in Safari. Using Safari? Don't. You have Firefox and Chrome on all of your platforms.
Re:Two years of Rust by eridius on Monday May 15, 2017 @05:35PM (#14345323)
This is an incredibly user-hostile attitude.

Also, you don't seem to understand. I'm not telling you to support gzip. If the browser doesn't support Brotli, then just send back uncompressed content.

And it's not just Safari. All sorts of tools that support HTTP don't support Brotli. Case in point, I ran `curl` against your page and got garbage back.

Re:Two years of Rust by mmstick on Monday May 15, 2017 @05:45PM (#14345415)
It's not user-hostile at all. It is quite simple. I don't want to implement gzip support, and I definitely don't want uncompressed content. You can't demand me to implement what I don't want to implement for my website. You are not my target audience (gzip users, IE users, Safari users).

> And it's not just Safari. All sorts of tools that support HTTP don't support Brotli. Case in point, I ran `curl` against your page and got garbage back.

My website does not support HTTP. HTTP is basically a legacy protocol at this point. My website is HTTPS-exclusive. It does not listen on port 80. That Brotli doesn't work through HTTP is not surprising, given that HTTPS support is a base requirement for Brotli support.

Re:Two years of Rust by eridius on Monday May 15, 2017 @05:50PM (#14345452)
From your last paragraph I question whether you really understand anything you're being told here.

Yes, I said HTTP instead of HTTPS, but that wasn't meant to signify that I was using unsecured HTTP, since HTTPS is supported virtually everywhere and generally understood to be a part of HTTP. More specifically, if I actually try and access http://mmstick.tk, I just get redirected to https://mmstick.tk anyway, without having a content body, so it's not even possible to get Brotli-encoded data out of your server over HTTP. And if I run `curl https://mmstick.tk` then I get garbage, which was the whole point of that sentence and what you still haven't even addressed.

Also, how can HTTPS possibly be a requirement for Brotli? Brotli is a compression format, it doesn't care what the medium of transmission is, and it works just fine over HTTP. It just won't work with your site over HTTP because your site doesn't serve any content over HTTP.

Re:Two years of Rust by mmstick on Monday May 15, 2017 @06:10PM (#14345601)
I'm not sure where your confusion is. It doesn't matter that HTTPS is an encrypted form of HTTP. I do not support HTTP, which means that I do not support HTTP without encryption! End of story.

Attempting to access the site via HTTP will merely redirect you to the HTTPS service. Nothing is being hosted on the HTTP service. When you reach the HTTPS service, your browser will receive a HSTS header that will cause your web browser to automatically direct to the HTTPS server and not touch HTTP at all for future requests, ever. Nor can your connection be downgraded to HTTP.

> Also, how can HTTPS possibly be a requirement for Brotli? Brotli is a compression format, it doesn't care what the medium of transmission is, and it works just fine over HTTP. It just won't work with your site over HTTP because your site doesn't serve any content over HTTP.

Tell that to Google, Mozilla, and Microsoft. You cannot use Brotli compression over HTTP. Only when you are using the HTTPS protocol can you use Brotli. And in general, if you support HTTPS and are using an update browser, you more than likely already have support for Brotli today.

Re:Two years of Rust by eridius on Monday May 15, 2017 @06:28PM (#14345723)
Your use of HTTPS is completely irrelevant here, but I've already addressed that in the other thread (https://news.ycombinator.com/item?id=14345695).

> You cannot use Brotli compression over HTTP.

This is completely incorrect. Not only does Brotli have literally nothing to do with the transmission medium and whether it's encrypted, but just to be sure I just tested it and Chrome was perfectly happy to render a Brotli-encoded response over unsecured HTTP.

My best guess here is you've confused HTTP/2 (which requires SSL) with Brotli encoding.

Re:Two years of Rust by mmstick on Monday May 15, 2017 @07:04PM (#14345993)
> This is completely incorrect. Not only does Brotli have literally nothing to do with the transmission medium and whether it's encrypted, but just to be sure I just tested it and Chrome was perfectly happy to render a Brotli-encoded response over unsecured HTTP.

I highly doubt that you actually tried this in practice. You are merely assuming that it works. For Google to overturn their decision would fly against all reasoning for the decision in the first place.

> My best guess here is you've confused HTTP/2 (which requires SSL) with Brotli encoding.

You seem to not have any experience with Brotli support and why the decision was made to only support it over HTTPS. One such comment that outlies the reasoning is from a Google employee themselves ( https://bugs.chromium.org/p/chromium/issues/detail?id=452335... ).

Hence, all vendors have followed suit and are not implementing brotli for HTTP. SSL prevents all the middle man infrastructure in place from employing such tactics that would break websites serving content with the br content encoding. There still exists much infrastructure in place that snoops HTTP traffic and, when it is detected that the content encoding is an unknown format (brotli), it will compress the stream with gzip and change the content encoding to gzip, thus breaking the website.

In addition, yet again, Google engineers clearly state that Brotli support is only available over HTTPS connections!

https://groups.google.com/a/chromium.org/forum/#!msg/blink-d...

One of the big reasons for my decision in pursuing HTTPS support on my personal blog was so that I could, in fact, use Brotli. I already had the code in place, but enabling Brotli on my web server would merely give errors about the content encoding being unknown, and as you will notice, br is missing from the list of available accepted encodings by the browser! Yet it is there when connecting via HTTPS! That's because Brotli is completely and utterly disallowed over HTTP! Google engineers stated it themselves. You can't have it both ways.

Re:Two years of Rust by rhblake on Monday May 15, 2017 @11:37PM (#14347200)
So lemme try to clear this up.

You are right in that brotli decoding is only supposed to work in secure contexts (so technically not just HTTPS, btw -- localhost is also considered a secure context, see https://bugs.chromium.org/p/chromium/issues/detail?id=624426).

Eridius is right in that it currently does work over insecure HTTP in Chrome, as confirmed in this open bug: https://bugs.chromium.org/p/chromium/issues/detail?id=579606 -- in which one Chromium dev comments "Decoding brotli even if it isn't requested is both bug and feature. It allows developers to test brotli without setting up https serving." Seems like they concluded that it is indeed a bug, however.

Reality and specifications often diverge...

(I do think not supporting gzip is absolutely bizarre, but that's another issue.)

Re:Two years of Rust by eridius on Monday May 15, 2017 @07:40PM (#14346188)
> I highly doubt that you actually tried this in practice.

I told you explicitly that I tested it. Now you're calling me a liar. I am not "merely assuming that it works", I actually tested it to the point of controlling the exact bytes that the server sent to the client using a hand-constructed HTTP response and then pointing Chrome at that server.

> For Google to overturn their decision …

I just looked into the specific behavior here. Here's what I found:

* If you point Chrome at localhost, it includes "br" in the Accept-Encoding header.

* If you point Chrome at some other domain using HTTP, it does not include "br" in the Accept-Encoding header.

* Either way, if the server actually returns a Content-Encoding of "br", Chrome will respect it.

So basically, Chrome always supports Brotli-encoded responses. However, it only requests Brotli over HTTPS and doesn't request it over HTTP, and the only reason for this distinction is to avoid middleware servers from mucking with Brotli-encoded pages that they don't understand.

[dead]
Re:Two years of Rust by eridius on Monday May 15, 2017 @09:35PM (#14346749)
mmstick, what part of "I have actually tested this" do you not understand? I am not assuming anything. Please stop skimming my comments looking for things you can try to argue against and actually read the damn things.

> It states right there on both of the pages from Google that I linked to you. Brotli will not work without HTTPS.

Again, you don't understand what you're actually reading. There are two parts to Brotli support. The first is whether the browser will declare that it supports Brotli. This is the Accept-Encoding header. The second is whether the browser will actually correctly interpret a response encoded as Brotli. HTTPS only affects the first part. Chrome only declares to the server that it can accept Brotli when sending an HTTPS request and not when sending an HTTP request. But if the server ignores the Accept-Encoding header and hands back a Brotli response anyway (like your server is doing), Chrome will handle that exactly the same way over HTTP as it does over HTTPS. Because it's just a content encoding, and there is literally no reason to make the code that handles content encodings care about HTTP vs HTTPS.

> Enable HTTPS and pages decode. Switch to HTTP and they do not decode. End of story.

Please try testing this, because I promise you this is wrong. Switch to HTTP and if the server returns a Brotli-encoded response (with the Content-Encoding header set correctly) Chrome will still decode it. The only thing HTTPS controls is the contents of the Accept-Encoding header and not the actual behavior of the response decoder. I have tested this multiple times against Chrome 58.0.3029.110, using both localhost and a remote server. You clearly have not, and in light of this your final sentence is particularly ironic.

Re:Two years of Rust by sqeaky on Monday May 15, 2017 @06:40PM (#14345803)
What about serving uncompressed content over https?

What about serving up an error page when the user's browser odesn't have compressor you support?

What about paying attention to web standards?

What about people who are stuck with old software for one reason or another?

Re:Two years of Rust by mmstick on Monday May 15, 2017 @07:01PM (#14345959)
> What about serving uncompressed content over https?

I have limited bandwidth. I don't want to serve uncompressed content over HTTPS.

> What about serving up an error page when the user's browser odesn't have compressor you support?

I will do that once I figure out how to get the Request header from Rocket's API.

> What about paying attention to web standards?

I'm already complying with HTTPS web standards. I'm even pending for the HSTS preload list ( https://hstspreload.org/?domain=mmstick.tk ).

> What about people who are stuck with old software for one reason or another?

That's their problem, not mine. You shouldn't be using old web browsers and outdated systems on the web. That makes you vulnerable.

Re:Two years of Rust by sqeaky on Tuesday May 16, 2017 @11:22AM (#14350263)
> That's their problem, not mine. You shouldn't be using old web browsers and outdated systems on the web. That makes you vulnerable.

You wouldn't host a page if you didn't want to share its content, doesn't failing to do so make it atleast partially your problem?

You are ignoring the list of encodings the client gives you, you are paying attention to some and not all. If we all did the web wouldn't work.

Maybe they have good reasons, you aren't them and you don't know their situation. But you have chosen to not share with people with tech older than one year...

Step back, and try to take an objective look at this. Do you know what percentage of web browsers actually in use will work? Do you know what percentage of people visiting your page see only gibberish?

Finally, Why are so many of your comments in the gray and everyone else's not in the gray? Why do so many of your technical peers disagree with you?

Re:Two years of Rust by jononor on Monday May 15, 2017 @05:19PM (#14345210)
You just broke your site for 40% of the web. http://caniuse.com/#feat=brotli
Re:Two years of Rust by executesorder66 on Tuesday May 16, 2017 @02:17AM (#14347725)
I get a message that says, "Your web browser does not support Brotli, and therefore is not supported. Report this as a bug to your web browser vendor."

I am using Firefox 53.02 on Linux, and my browser is sending this request header:

Accept-Encoding: gzip, deflate, br

As far as I know Firefox fully supports brotli compression. Any idea what is wrong?

Re:Two years of Rust by Terribledactyl on Monday May 15, 2017 @04:59PM (#14345066)
I'm having a bit of an issue with your site in Safari. 10.12.4 sierra, extensions turned off. https://s2.postimg.org/4t8v7lqdl/Screen_Shot_2017-05-15_at_1...
Re:Two years of Rust by mmstick on Monday May 15, 2017 @05:03PM (#14345101)
You need a web browser that supports Brotli compression -- the standard compression algorithm for HTTPS. Safari does not support it, but everyone else does. Even Edge. http://caniuse.com/#feat=brotli
Re:Two years of Rust by detaro on Monday May 15, 2017 @05:53PM (#14345477)
> the standard compression algorithm for HTTPS

That's utter nonsense.

Re:Two years of Rust by mmstick on Monday May 15, 2017 @06:02PM (#14345543)
All vendors do not support Brotli compression with the HTTP protocol. Brotli is only supported when accessing a site through HTTPS. Moreover, as Brotli compresses and decompresses faster than Gzip, whilst simultaneously producing smaller file sizes, there is no point in using anything other than Brotli for HTTPS website. Hence, it's the standard compression algorithm for HTTPS. All web vendors support Brotli w/ HTTPS, except Apple's WebKit. Simple.
Re:Two years of Rust by kbenson on Monday May 15, 2017 @06:41PM (#14345809)
> Hence, it's the standard compression algorithm for HTTPS.

I think you're mistaken "de-facto standard" for "standard". They are not the same thing, and whether brotli actually is a de-facto standard is debatable, but it's not the standard.

It's perfectly acceptable to do whatever you want with your own web stack and application. You wouldn't be getting much pushback if you simply justified it as "It's what I want to do", but you are providing evidence that is factually incorrect, where no evidence is really required.

Also, it should be noted that there is a valid reason to eschew compression for HTTPS on the client side, and that's security. Compression of HTTPS channels opens up the possibility for a few more forms of attack on the encrypted data.

Re:Two years of Rust by mmstick on Monday May 15, 2017 @07:12PM (#14346034)
> You wouldn't be getting much pushback if you simply justified it as "It's what I want to do"

Actually, if you look at the top level comments that I've made, that's exactly what I said. What I'm getting in response to that is that I'm basically 'breaking the web' because I don't want to comply with sniffing request headers and offering gzip to Apple WebKit users. If I don't care about supporting your web browser, then I don't care about supporting your web browser. You can't make me.

> Also, it should be noted that there is a valid reason to eschew compression for HTTPS on the client side, and that's security. Compression of HTTPS channels opens up the possibility for a few more forms of attack on the encrypted data.

That kind of security isn't a concern to me. Not having compression at all would take a larger toll on my bandwidth, and increase latency of page delivery. Bandwidth isn't free.

Re:Two years of Rust by nercury on Monday May 15, 2017 @06:32PM (#14345749)
Please stop claiming to support HTTPS when your site breaks perfectly https-compliant browsers.
Re:Two years of Rust by mmstick on Monday May 15, 2017 @07:03PM (#14345981)
It supports HTTPS perfectly fine. I am even on the HSTS preload list. You can't get on this list unless you have a HTTPS website that meets standard requirements. https://hstspreload.org/?domain=mmstick.tk
Re:Two years of Rust by DiThi on Monday May 15, 2017 @11:22PM (#14347145)
That page doesn't list as a requirement serving content that the browser can decode.
Re:Two years of Rust by Franciscouzo on Monday May 15, 2017 @06:40PM (#14345800)
Your site does not works with Firefox ESR.
Re:Two years of Rust by mmstick on Monday May 15, 2017 @08:44PM (#14346523)
That's because ESR is a very ancient version of Firefox. Many things don't work on ESR. You need at least Firefox 52.
Re:Two years of Rust by Animats on Monday May 15, 2017 @11:54PM (#14347267)
You need at least Firefox 52.

The current release of Firefox is only 53.0.2. If you need 52 to view a site, you're overdoing the new features.

Re:Two years of Rust by pjmlp on Tuesday May 16, 2017 @02:59AM (#14347861)
Enterprises, those companies that you want to eventually adopt Rust, usually use ESR.