Forum

migrating from hiawatha 9->10 , gzip files

Ron
15 June 2016, 17:01
Hi

I have been using hiawatha 9.14 for a while on an embedded device and was looking at updating to 10.3 . It seems that the feature UseGzFile has been removed in favour of dynamically gz files as they are requested.

I was wondering if there is a way to configure hiawatha to mark some files as already compressed so It does not do the compression on the file.

The way that my webserver files are given to me is already compressed so I don't actually have the uncompressed files on the system

currently

i have files like
filename.gzip.js
which are already compressed. In hiawatha 9.3 i as symlinking them to filename.gzip.js.gz and using the UseGzFile option.

Is there a way to tell hiawatha to send the file filename.gzip.js with gzip in the headers but do not attempt to compress it?

Thanks
Hugo Leisink
15 June 2016, 18:47
Why go through all that trouble? Simply gunzip them as plain text .js files and let Hiawatha handle the compression.
Stephen R. van den Berg
26 June 2016, 02:36
For what it's worth: I'm running an adapted 10.3 version with that UseGzFile feature back in it again. If you want to, I can share the source .
Hugo Leisink
26 June 2016, 09:28
Why do you want that old feature back? Is the current GZip feature not working for you?
Stephen R. van den Berg
26 June 2016, 09:51
For two main reasons:
- Stability after upgrades. I have several larger deployments, I want them to keep running smoothly without config-changes, without behaviour changes which might affect performance. So I need a smooth upgrade that always works without handholding.
- Doing compression on-the-fly is undesirable on some systems:
+ Sometimes you don't have writeable partitions available.
+ Sometimes you can't afford the "random" CPU spikes needed for compression.
+ Sometimes you have differing compression-factors, autocompression is a one-size-fits all solution (that does not always fit).
Stephen R. van den Berg
27 June 2016, 17:03
FWIW, the following git repository can be used. It's by no means official, I will not guarantee availability at this point (shuffling servers around here). But anyone interested (Hugo?) can take a look.
git clone git://devel2.cuci.nl/hiawatha
The branch you want to get is called "native". Perform "git log --decorate" to see a full historic log from v10.3 back to 2005 v3.7. It includes all local patches I use in my hiawatha servers. Hugo, you're more than welcome to incorporate patches from it into your mainstream version.
This topic has been closed.