Kelson
038e86e0d8
Merge pull request #419 from kiwix/legoktm-patch-1
...
debian: Have libkiwix-dev depend on libmicrohttpd-dev
2020-11-04 15:20:36 +01:00
Kunal Mehta
41cee1cfe0
debian: Have libkiwix-dev depend on libmicrohttpd-dev
...
As of 9c925f6778
, it's now required in the pkg-config file.
2020-11-04 15:14:09 +01:00
Kelson
7e2d174cfb
Merge pull request #422 from kiwix/rgaudin/taskbar-height
...
Adjust body padding-top for taskbar
2020-11-04 15:13:18 +01:00
renaud gaudin
52da58a294
Adjust body padding-top for taskbar
...
taskbar is placed *above* content using a `padding-top: 3em;` rule
Currently, in regular case, padding-top is too large and leaves ~4/5px between the
taskbar and the content.
This fixes it by using a `calc()` rule to eliminate this extra space
2020-11-04 11:53:59 +00:00
Matthieu Gautier
0f8caba3a5
Merge pull request #418 from kiwix/fix_counter_parsing
2020-10-30 13:42:52 +01:00
Veloman Yunkan
0f8fe1f63f
Alternative implementation of parseMimetypeCounter()
2020-10-29 14:11:27 +04:00
Matthieu Gautier
ed32e16db2
Use a reference in `test/server.cpp` loop.
...
This is mainly to make the macos CI pass.
2020-10-28 16:08:37 +01:00
Matthieu Gautier
08464f23bc
Better parsing of `M/Counter`
...
Mimetype may contain a parameters.
Then, the mimetype would be something like "text/html;foo=bar;foz=baz"
It will contains a `;` and `=` and it conflicts with the same operators
we use to separate the items in our list.
We have to use a more advanced algorithm which takes the context into
account.
Fix #416
2020-10-28 16:03:18 +01:00
Matthieu Gautier
ef42abea4b
Add some tests of `parseMimetypeCounter`
2020-10-28 14:44:23 +01:00
Matthieu Gautier
4407dd12bd
Move mimetypeCounter parsing in its own function.
2020-10-28 14:08:06 +01:00
Matthieu Gautier
d546ae38c4
Merge pull request #417 from kiwix/fix_macos_ci_install
...
[CI] Fix macos packages installation
2020-10-27 15:18:23 +01:00
Matthieu Gautier
7a11ec6ea4
[CI] Fix macos packages installation
2020-10-27 15:13:19 +01:00
Matthieu Gautier
095c86cf90
Merge pull request #415 from kiwix/stop_server
2020-10-16 14:12:47 +02:00
Matthieu Gautier
632583ede2
Add missing include
2020-10-07 18:43:57 +02:00
Matthieu Gautier
9c925f6778
kiwix-lib pc need libmicrohttpd
2020-10-07 17:48:30 +02:00
Matthieu Gautier
61f9d4ab3a
Stop the internal server only if it exists.
2020-10-07 14:36:45 +02:00
Kelson
de6b8ba4de
Merge pull request #413 from hashworks/archCommunityPkg
...
Add repology package badge
2020-08-30 22:05:37 +02:00
hashworks
ab7349dbc8
Switch to repology package badge
2020-08-30 20:59:14 +02:00
hashworks
292004703e
Add shield and link to official Arch Linux package
...
I recently became an Arch Linux Trusted User and moved kiwix-lib
to the official community repository.
2020-08-30 13:22:13 +02:00
Kelson
c3e1e46d58
No AUR libkiwix package anymore
2020-08-30 09:56:38 +02:00
Matthieu Gautier
aba2f35092
New version 9.4.0
2020-08-28 16:04:40 +02:00
Matthieu Gautier
b3a3dfb79f
Merge pull request #411 from kiwix/fix_subprocess_destructor
2020-08-28 16:02:25 +02:00
Matthieu Gautier
470bfc3f1f
Better variable name for outStream.
2020-08-28 15:27:03 +02:00
Matthieu Gautier
ea3180cb8c
Better error printing.
2020-08-28 15:27:03 +02:00
Matthieu Gautier
72d3f8f8e2
Fix segmentation fault with curl requests.
...
Use a heap allocated buffer (with lifetime of Aria2 class) instead of
a stack allocated one.
Original fix made by @ZaWertun. Kudos to him.
Fix #kiwix/kiwix-desktop#123, kiwix/kiwix-desktop#513
and kiwix/kiwix-desktop#423
2020-08-26 12:42:16 +02:00
Matthieu Gautier
af9e03904c
Use std::mutex and std::unique_lock instead of pthread mutex/lock.
...
It simplify a bit the code and ensure that mutex is correctly unlock
even in case of exception.
2020-08-26 12:30:56 +02:00
Matthieu Gautier
39611cbd60
Wait for waitingThread to exit before destroying the subprocess memory.
...
WaitingThread read some shared memory with the SubProcess
(`mutex`, `m_running`).
When we destroy the SubProcess, we must be sure that WaitingThread has
correctly finished else we may have invalid read/write on freed memory.
2020-08-26 12:26:04 +02:00
Kelson
4e98a76c19
Merge pull request #408 from kiwix/ppa-bionic
...
PPA: Build and publish packages for Ubuntu BIonic
2020-08-21 19:17:22 +02:00
Kunal Mehta
14767e6edb
debian: Support already gzipped manpages
...
meson stopped automatically compressing in 0.49.0, but bionic uses 0.45.0.
2020-08-21 19:12:20 +02:00
Kunal Mehta
39bc8828cd
PPA: Build packages for Ubuntu Bionic
2020-08-21 19:12:20 +02:00
Kelson
c183f57670
Merge pull request #401 from kiwix/rgaudin/external-block-warn
...
Added comment marking dependency of a JS variable with warc2zim
2020-08-19 18:32:22 +02:00
renaud gaudin
009eb7f905
Added comment marking dependency of a JS variable with warc2zim
...
warc2zim's service worker captures all requests and then decides what to do based on
availability of the URL in the ZIM or not.
To allow the external URL blocking mechanism, it needs to known whether this was
enabled or not (as those in-iframe links won't be caught).
It detects this by looking for the `window.block_path` variable that is set in the
`block_external.js` script.
As this is fragile, we're adding a comment so that a future maintainer knows that
a third party tools relies on it.
2020-08-19 18:31:46 +02:00
Matthieu Gautier
eb7a8beb77
Merge pull request #397 from kiwix/refactor_response
2020-08-13 11:22:06 +02:00
Matthieu Gautier
6f0d3003ac
Remove `m_compress` member.
2020-08-13 11:16:41 +02:00
Matthieu Gautier
ee17b0739a
Fix compilation on CI native dyn.
...
On the CI, the native_dyn docker image is setup with a packaged version
on libmicrohttpd for which `MHD_HTTP_RANGE_NOT_SATISFIABLE` is not
defined.
When the CI will be fixed, we can revert this commit.
2020-08-13 11:16:41 +02:00
Matthieu Gautier
47436f7bdd
Move some header setting in response's constructors.
...
It make easier to understand what is somehow constant and what depends
of the context.
2020-08-13 11:16:41 +02:00
Matthieu Gautier
3352c95314
Remove the `RedirectResponse` and use a basic `Response` with header.
2020-08-13 11:16:41 +02:00
Matthieu Gautier
77123ac74c
Move the adding of 304 headers in 304 factory.
...
This avoid us to create a ContentResponse just to have some correct
headers.
2020-08-13 11:16:41 +02:00
Matthieu Gautier
9078f0ac6e
Remove `ResponseMode`.
2020-08-13 11:16:41 +02:00
Matthieu Gautier
8d6567d067
Create a utility builder for 416 response.
...
Also add a map in the response to store specific headers.
2020-08-13 11:16:41 +02:00
Matthieu Gautier
6d5cddca12
Fix android compilation
...
Android clang complains about the fact it cannot move the
`std::unique_ptr<ContentResponse>` into a `std::unique_ptr<Response>&&`
(for the implicit `std::unique_ptr<Response>` constructor).
Let's help him a bit.
2020-08-13 11:16:41 +02:00
Matthieu Gautier
a3939e9a05
Move all the content code in the ContentResponse.
2020-08-13 11:16:41 +02:00
Matthieu Gautier
eee621d15b
Move small utilities method to create response in Response class.
2020-08-13 11:16:41 +02:00
Matthieu Gautier
7b2ee37437
Move the entry response to its own class.
2020-08-13 11:16:41 +02:00
Matthieu Gautier
f014fb2895
Introduce a ContentResponse.
...
This is only an "interface" for now as other type of response (entry) may
be "transformed" to a ContentResponse.
We cannot move all the code in the class.
2020-08-13 11:16:41 +02:00
Matthieu Gautier
1011d1ff0b
Move the redirection response in its own class.
...
The redirection is the easiest to move, let's start with this one.
2020-08-13 11:16:41 +02:00
Matthieu Gautier
9e351b279e
Remove `get_default_response` in favor of a static Response method.
...
We want to build different kind of response depending of the context.
2020-08-13 11:16:41 +02:00
Matthieu Gautier
a0bdc0821c
Move internalServer code into its own source files.
2020-08-13 11:16:41 +02:00
Matthieu Gautier
a819d9e3e0
Make the server handle pointer to response instead of plain response.
...
This is a preparatory work.
We will specialize the response and so we need a pointer to response
instead of plain response.
2020-08-13 11:16:41 +02:00
rgaudin
49f3c56680
Merge pull request #400 from kiwix/rgaudin/home-favicon-size
...
Set fixed size for favicon in home page listing
2020-08-13 09:59:25 +02:00