News for hackers. Stuff that matters.
Re:The Several Million Dollar Bug by codingdave on Monday June 09, 2014 @10:03AM (#7868473)
This sounds less like a bug, and more like a specific tweak to his logic due to his specialized use case.

In most cases, even if the web server knows that a specific page contains images, it does not know if the browser is actually going to request those images. What if it is a bot? What if the user cancels? What if they have disabled image downloads in that browser? What if they have the images and other secondary files cached?

I do think it is worthwhile to consider such things for your individual needs, but most use cases won't change the standard request/response mechanism.

Re:The Several Million Dollar Bug by jacquesm on Monday June 09, 2014 @10:14AM (#7868533)
This was actually one of the easier aspects to solve, the webcam server ran on a different port than your regular web server so it knew exactly what it was that you were going to request, it existed for one purpose only: to serve up those images. There was no HTML or other stuff to be confused with. Technically it was probably possible for a browser to re-use the same connection and to request say in index.html after requesting an image but in practice this simply never happened. After the first image request all the subsequent requests on that same socket would be image requests as well.
Re:The Several Million Dollar Bug by Svip on Monday June 09, 2014 @10:08AM (#7868506)
While true that you cannot know whether the client will request the images, you can use their user agent to make a pretty decent prediction. There will be corner cases where you are wrong, but most of the time your prediction will be true.

For instance, if a bot is pretending to be a Chrome browser, you'd think it was a regular client, but in fact it was not. But that's the bot's fault, not your implementation.

Re:The Several Million Dollar Bug by TeMPOraL on Monday June 09, 2014 @11:23AM (#7868861)
> But that's the bot's fault, not your implementation.

It's your implementation that breaks the protocol spec, not the bot, so it is still your fault.