Open rajdravid opened 8 years ago
You should register the output filter to the pathconf by calling h2o_compress_register
.
Thank you.
Sorry leaving this open for others.
I don't get it yet. What exactly do I have to do (at least) when starting a server with libh2o to have gzip compression enabled. Is it a built in feature? Is there a (simple!) example? Thank you!
@Cheurch
path_conf = h2o_config_register_path(host_conf, "/", 0);
h2o_compress_args_t ca;
h2o_compress_register(path_conf, &ca);
h2o_file_register(path_conf, "static", NULL, NULL,
H2O_FILE_FLAG_GUNZIP);
snippet from my simple libh2o server responsible for compressed static assets serving, which is just a slightly modified h2o/examples server. see entire code at https://github.com/moki/simple-libh2o-server
Is there any way we can enable gzip encoding for content sent via libh2o ? Can you please provide a sample.
Thanks !