Thanks everyone for the tests. It seems that (language issues aside) this is 
once again working.
Whew. One thing off the plate.

> On Feb 22, 2023, at 02:38, Robert  wrote:
> 
> I also tried to talk to the update server directly both with a web browser 
> and with curl and always get the 
> 
> Latest version is "Subsurface-5.0.10", please check <a 
> href="http://subsurface-divelog.org/download";>our downloads page</a> for 
> information on how to upgrade.

Yeah, the server used to reject direct curl access (as it is only intended as a 
backend for the built-in service). This definitely isn't an API that people 
should use.

> even when I GET 
> /updatecheck.html?os=osx&version=5.0.10.82&uuid=ca73c783-0d0b-40f5-92e2-ae062f323bc2
> which is the URL that I captured with wireshark when the latest version of 
> Subsurface asked for it. Strange but should not be one of your worries since 
> that is not an API that is exposed to the users. I only did it because I 
> wanted to see what the update check actually does as I wondered why you do it 
> with some Qt magic rather than about ten lines of perl. Anyway, don’t worry.

I used to have a bit of statistics magic behind this where I used the uuid to 
avoid double counting people and tried to get a rough idea how many folks were 
using Subsurface. But most OSs these days strip out the UUID (assuming that 
they are used for tracking instead of de-duplication... which from a privacy 
point of view makes a lot of sense), and as a result those statistics have 
become completely meaningless - so I removed all of that from the new code.
Which means we can also remove it from the caller, I guess.

And yes, with all that in mind, I should have been able to massively simplify 
the app (I did) and move it to something like node.js or Python or (why?) Perl. 
But given that I'm generally far more comfortable writing C/C++ code and that I 
had working code to borrow from (I just needed to switch to a different 
http-server library - none of the other code that I used made any difference 
between Qt4/Qt5 (or even Qt6 for that matter))... anyway, I just rewrote the 
C++ app since that seemed to be the most likely thing to succeed in a limited 
amount of time. And the result ended up being about 100 lines of code, 
including a bunch of error handling and boilerplate.

/D

_______________________________________________
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to