We've added compression to GET requests for f-droid stuff. We added it in haproxy and it looks like it is only doing it on GET requests and not HEAD requests. We hope this is good enough.
We have not had gzip enabled globally since we mostly ship compressed files and consider it a waste of cycles. I'll have a look to see if we can get it enabled for f-droid.
// Andreas Kempe
On Tue, Sep 20, 2022 at 05:05:08PM +0000, Jochen Sprickerhof (@jspricke) wrote:
Jochen Sprickerhof commented:
@andkem it looks like the mirror does not support gzip compression in the Accept-Encoding http header, tested with:
curl -H Accept-Encoding: gzip -I https://ftp.lysator.liu.se/pub/fdroid/repo/index-v2.json
could that be enabled?
andkem (4068c728) at 15 Aug 21:10
No worries. Sorry for missing the other setlocale() the first time around!
Okay. I pushed a removal of g_setenv() again. My reasoning is that it would be better to catch bugs where the locale is not being set correctly than relying on the environment override that might not always work.
andkem (4068c728) at 15 Aug 20:39
siril_language: set LC_NUMERIC to "C" when setting language
Great! That is a reasonable explanation. When I did the first change, I missed that one call to setlocale when I searched though the code. It makes sense since we override the language and then call setlocale(LC_ALL, "")
which of course overwrote our LC_NUMERIC. From what I can tell there should be no more calls to set the locale so that should be the last one.
@lock042: Colud you try !190 (merged), but modify it to remove g_setenv? I think I found the issue. We can still leave g_setenv in place, but I would like to know whether it fixes the problem.
To avoid issues with languages using "," as decimal separator, set the numerical locale to "C" when configuring the language.
andkem (a1bb0423) at 15 Aug 20:10
siril_language: set LC_NUMERIC to "C" when setting language
... and 75 more commits
Since I can't reproduce the issue and g_setenv can't hurt, I guess we don't really have to dig into the issue as long as it works for you. Although it had been nice to understand why it behaves the way it does.
@lock042: I ran Siril without g_setenv and I tried setting my locale to fr_FR.UTF-8:
LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_ALL=fr_FR.UTF-
I get the following output:
log: Bienvenue dans siril v0.99.11
log: Type de fichiers supportés : Images BMP, Images PIC (IRIS), Images binaires PGM et PPM, Images RAW, Images FITS-CFA, Films, Séquences SER, Images TIFF, Images JPG, Images PNG.
log: Fichier de paramètres chargé : '/usr/home/andkem/.config/siril/siril.config'
log: Calcul parallèle activé : Utilisation de 4 processeurs.
Chargé avec succès '/usr/local/share/siril/siril.css'
Chargé avec succès '/usr/local/share/siril/siril3.glade'
log: Définir le répertoire de travail à '/usr/home/andkem/Pictures/siril/2021-08-12/trollsländehopen'
Loading dark theme...
log: Recherche de scripts dans : "/home/andkem/bin/share/siril/scripts" ...
log: Chargement du script Mono_Preprocessing
log: Chargement du script OSC_Extract_Ha
log: Chargement du script OSC_Extract_HaOIII
log: Chargement du script OSC_Preprocessing
log: Chargement du script OSC_Preprocessing_WithDrizzle
scripts: Erreur à l’ouverture du répertoire « /usr/home/andkem/.siril/scripts » : No such file or directory
scripts: Erreur à l’ouverture du répertoire « /usr/home/andkem/siril/scripts » : No such file or directory
log: Chargement de la méthode d'alignement : Alignement sur une étoile (ciel profond)
log: Chargement de la méthode d'alignement : Alignement sur deux ou trois étoiles (ciel profond)
log: Chargement de la méthode d'alignement : Alignement global (ciel profond)
log: Chargement de la méthode d'alignement : Alignement par motif de l'image (planétaire - disque entier)
log: Chargement de la méthode d'alignement : Coefficient de corrélation (planétaire - surfaces)
log: Chargement de la méthode d'alignement : Alignement Comète/Astéroïde
log: L'extension par défaut des FITS est définie à .fit
and can't really see anything strange. It kind of scares me that you get different behaviour than I do unless it's a difference between our operating systems, but I don't think it should be.
Edit: I also tried changing some settings and checking the saved .config/siril/siril.config which used .
as the decimal separator.
@lock042: That's strange. I wonder whether the CSS parsing happens before g_application_run
or rather before siril_app_startup
? Do you have details on how to reproduce the issue? I would like to look into it because it should happen with that locale set via LC_ALL even though g_setenv was restored since g_setenv
shouldn't be able to override the locale in that case.
You're welcome!
andkem (6e4adf87) at 13 Aug 18:45
andkem (6e4adf87) at 13 Aug 12:12
Explicitly set LC_NUMERIC to C
To clarify: setlocale(LC_NUMERIC, "C");
should override whatever locale is the system default regardless of environment variables.
Sure, I'll apply it to main-cli.c as well.
As for why I removed g_setenv
, that's because it shouldn't be necessary anymore. The only reason g_setenv
worked is that g_application_run
calls setlocale(LC_ALL, "")
when started, reading the default system locale. As long as LC_ALL is unset, g_setenv("LC_NUMERIC", "C", TRUE)
inserts the value into the system locale and it is loaded by Glib when the application is started and setlocale(LC_ALL, "")
happens. If you want, I can leave it in.
andkem (83e082f0) at 13 Aug 09:44
Explicitly set LC_NUMERIC to C
I've opened a merge request with a suggested patch at !189 (merged).