Matthieu Gautier
4c3acd06de
Add missing include.
...
Needed by printf.
2018-06-14 17:35:40 +02:00
Kelson
4cd9d78d21
Merge pull request #199 from kiwix/kiwix_server_404
...
return 404 for missing resources
2018-06-09 16:21:17 +02:00
Philip Munaawa
efd4a1434e
return 404 for missing resources
2018-06-09 15:29:40 +02:00
Matthieu Gautier
dfc601dacf
Merge pull request #196 from kiwix/no_install
...
Remove kiwix-install tool.
2018-05-21 12:18:30 +02:00
Matthieu Gautier
7c254544ca
Remove kiwix-install tool.
...
Fix #189
2018-05-21 12:09:13 +02:00
Kelson
b22ee94f10
Merge pull request #195 from kiwix/proper_exit_code
...
Proper exit code
2018-05-20 08:34:41 +02:00
Kelson
3766c4882b
Proper exit code #194
2018-05-19 20:59:18 +02:00
Matthieu Gautier
26da54f9c3
Merge pull request #187 from swiftugandan/kiwix_serve-fix-global_page_static_resources-1
...
fix static resources on home page when using --nosearchbar
2018-04-24 14:16:12 +02:00
Philip Munaawa
4433421c48
also replace __CONTENT_ESCAPED__ for --nosearchbar
2018-04-24 13:06:46 +01:00
Philip Munaawa
c00f0be7ef
fix static resources on home page when using --nosearchbar
2018-04-24 11:29:41 +01:00
Matthieu Gautier
773b9e5443
Merge pull request #185 from kiwix/0.5.0
...
0.5.0
0.5.0
2018-04-23 20:49:57 +02:00
Matthieu Gautier
fbddabb10f
New version 0.5.0
2018-04-23 19:22:18 +02:00
Matthieu Gautier
3ad50ccf17
Update depenedency version of kiwix-lib.
2018-04-23 19:22:06 +02:00
Matthieu Gautier
c265eb8b24
Merge pull request #182 from kiwix/new_api
...
Update kiwix-serve to the new kiwix-lib API.
2018-04-23 18:42:52 +02:00
Matthieu Gautier
6f49e78eb4
Update kiwix-serve to the new kiwix-lib API.
...
Related to kiwix/kiwix-lib#123
2018-04-23 15:26:24 +02:00
Matthieu Gautier
d25329ecb4
Merge pull request #178 from kiwix/opds
...
Opds
2018-04-23 15:24:15 +02:00
Matthieu Gautier
bd8d0c3805
Get the dependencies archive using the correct new name scheme.
...
Now that we are compiling to ios, deendencies archive names have
TRAVIS_OS_NAME included.
2018-04-23 10:31:22 +02:00
Matthieu Gautier
a01906d273
[manage] Move handling of action in separated function.
2018-04-19 18:05:41 +02:00
Matthieu Gautier
4bd18ce466
Add open search support to search in the catalog.
2018-04-19 18:05:41 +02:00
Matthieu Gautier
fb8c14a1e4
Make kiwix-serve serve an opds stream of all zims.
2018-04-19 18:05:41 +02:00
Matthieu Gautier
2acd276753
[KIWIX-SERVE] Serve a zim metadata on the '/meta' url.
...
This can be used to get some metadata about a zim with a simple http
request.
2018-04-19 18:05:41 +02:00
Matthieu Gautier
53b2dadfce
Compile without warning.
2018-04-19 18:05:41 +02:00
Matthieu Gautier
eccf5e194c
Merge pull request #177 from kiwix/rpath
...
Set rpath of the installed binaries.
2018-04-17 17:14:53 +02:00
Matthieu Gautier
8356277562
Set rpath of the installed binaries.
...
Let's set RPATH of installed binaries, this way, we will be able to
run dynamically linked binaries without changing LD_LIBRARY_PATH.
2018-04-17 16:29:41 +02:00
Matthieu Gautier
c6ace1eafc
Merge pull request #171 from kiwix/new_version
...
New version 0.4.0
0.4.0
2018-03-27 12:03:21 +02:00
Matthieu Gautier
8552985cd4
New version 0.4.0
2018-03-27 11:20:21 +02:00
Matthieu Gautier
9997a6ec18
Merge pull request #169 from kiwix/infinit_redirect
...
Correctly pre-increment the loopCounter.
2018-03-26 10:04:28 +02:00
Matthieu Gautier
8b6abc0e35
Correctly pre-increment the loopCounter.
...
In case of infinit redirection, if we post-increment the loop counter,
we will exit the loop when loopCounter will be 42 and increment it.
So loop counter will be 43.
Let's pre-increment the counter to still compare with 42 (more consistancy)
Fix #168
2018-03-25 17:07:38 +02:00
Kelson
426796dc37
Merge pull request #135 from kiwix/search_suggestions
...
Update usage() with --suggestion
2017-12-20 19:54:22 +01:00
kelson42
712cdf5e7b
Update usage() with --suggestion
2017-12-20 19:07:38 +01:00
Matthieu Gautier
74cc1d0708
Merge pull request #133 from kiwix/better_search_tool
...
Better search tool
2017-12-19 15:24:29 +01:00
Matthieu Gautier
3ce668af66
Add a suggestion option to search in suggestion.
...
There are two kinds of search system :
- Suggestion (search in title only)
- "Classical" search (search in whole content)
The option `--suggestion` allow `kiwix-search` to search for suggestion.
Without the option, a "classical" search is made.
Fix #132 .
2017-12-19 14:17:15 +01:00
Matthieu Gautier
2b69cc8ffc
Pass verboseFlag to underlying kiwix::Searcher.
2017-12-19 14:13:36 +01:00
Matthieu Gautier
71ffaaa05a
Merge pull request #127 from kiwix/compilation_fixes
...
Compilation fixes
2017-12-13 16:26:57 +00:00
Matthieu Gautier
f3fb5d61cc
Use correct option to compile a static binary in travis.
...
We must use custom option `static-linkage` instead of meson's
`default-library`.
2017-12-13 17:17:28 +01:00
Matthieu Gautier
05c63536de
Force usage of meson 0.43.0.
...
Static compilation is broken with meson 0.44.0.
2017-12-13 16:43:42 +01:00
Matthieu Gautier
16e12ad463
Stop workaround xapian-core.pc
...
`xapian-core.pc` is now correct stop workaround it adding extra
link args.
The workaround is broken with meson 0.44.0 and static compilation.
However, libmicrohttpd is using `librt` if present but doesn't declare
it in its `libmicrohttpd.pc` file so we must add it manually if we found
it.
2017-12-13 16:43:08 +01:00
Matthieu Gautier
c91285fc29
Merge pull request #123 from kiwix/fix_crash
...
Fix crash
2017-12-04 16:04:08 +00:00
Matthieu Gautier
5c11ff1a30
Correctly cast to int in debug message.
...
A `class enum` is not implicitly cast to an `int`.
It is better to explicitly cast it to avoid future error with different
versions of compiler.
2017-12-04 15:12:27 +00:00
Matthieu Gautier
9eaf512bf9
Correctly handle NULL string for request arguments.
...
When iterating over arguments of a request, the value can be a null pointer
if the argument is provided without a `=`.
https://www.gnu.org/software/libmicrohttpd/manual/html_node/microhttpd_002drequests.html
We have to handle this correctly.
Should fix #116 .
2017-12-04 15:10:45 +00:00
Matthieu Gautier
9a29874f9f
Better verbose message.
...
The parsing of the request in the `RequestContext` constructor may be
buggy and make kiwix-serve crash.
If we print debug information only after the request is parsed, we will
never print the debug information if the parsing crash.
It is better to, at least, write that we've got a new request to avoid
us to try to debug previous request where everything were ok.
2017-12-04 15:08:18 +00:00
Matthieu Gautier
aa9647e88c
Merge pull request #122 from kiwix/gcc5
...
Compile using gcc-5 on native ubuntu.
2017-12-04 12:29:59 +00:00
Matthieu Gautier
da0c697963
Compile using gcc-5 on native ubuntu.
...
As dependencies prepared by kiwix-build are build using gcc-5
(kiwix/kiwix-build@7fc557d ), we need to also compile libzim using gcc-5.
2017-12-04 11:15:50 +00:00
Matthieu Gautier
77d25686cb
Merge pull request #115 from kiwix/better_search_handling
...
Better search handling
2017-11-29 16:21:45 +00:00
Matthieu Gautier
3df2fa708b
Set the global humanReadableId.
...
This is needed by kiwix-lib to generate correct "next page" links.
2017-11-27 12:45:41 +00:00
Matthieu Gautier
9021f87715
Handle search with no content and empty query string.
...
We need to handle :
- No content because it is how we do multisearch.
- No query string because it is how we can do geosearch.
2017-11-27 12:44:25 +00:00
Matthieu Gautier
04b05b7902
Merge pull request #111 from kiwix/better_request_parsing
...
Better request parsing
2017-11-27 11:39:10 +00:00
Matthieu Gautier
a8e73aab98
Move the request context out of kiwix-serve.cpp.
...
RequestContext is now a "complex" class that handle a lot of thing for
the handlers :
- The rootLocation is correctly handle and remove from the url.
So a handler doesn't have to care about it (when parsing the url)
- Request arguments and header are stored in a map and there are access
methods to get it.
- Request arguments can be automatically convert to other type than string.
- Better parsing of the `byte` header. Related to #91 .
2017-11-27 11:20:02 +00:00
Matthieu Gautier
234a9d9719
Let the different handlers look for the reader/searcher.
...
It is to the handlers to get the right reader/searcher they want and
create correct error/default page if the name doesn't correspond to a
zim file.
The `handle_default` function has also be renamed to `build_homepage`
because it is what is done. (And it doesn't handle a request).
2017-11-22 16:16:54 +00:00
Matthieu Gautier
c93617473d
Move some variable out of the request's context.
...
`humanReadableBookId`, `reader` and `searcher` are not so global that
it seems.
Let's move it out of the request object as handler may or not use them.
2017-11-22 15:53:34 +00:00