757 Commits

Author SHA1 Message Date
Matthieu Gautier
540fcd3be9 Merge pull request #84 from kiwix/byte_range
Byte range
2017-10-11 17:14:01 +02:00
Matthieu Gautier
ad7238b0c9 Stop refusing the first connection.
I don't know why we are refusing the first connection.

It seems to work without this.
Moreover, this is not thread safe and it would be pretty complex to
make it thread safe.
2017-10-11 17:00:55 +02:00
Matthieu Gautier
b5c91417ff Better debug information of each request. 2017-10-11 17:00:55 +02:00
Matthieu Gautier
b638df81fa Implement response to bytes range request.
Handle bytes range request http header.
Do not read the full buffer but try to stream it as far as possible.
2017-10-11 17:00:55 +02:00
Matthieu Gautier
58f0a716a6 Correctly return 404 if asked skin is not existing.
Fix #83
2017-10-10 17:02:15 +02:00
Matthieu Gautier
a2324b5e8b Use a structure RequestContext to pass all the context of a request.
This simplifies the code and avoid to pass a lot of arguments to
each function.
2017-10-10 16:59:45 +02:00
Matthieu Gautier
c2ac40d4f5 Merge pull request #82 from kiwix/multi_thread
Make kiwix-server multi-threaded.
2017-10-10 14:43:50 +02:00
Matthieu Gautier
4534b51f5e Use printf instead of cout.
`std::cout` stream is not thread safe at all.
Printing from different threads can lead to corrupted stream (and no
output working).

Using `printf` may still lead to interleaved output but nothing will broke.
2017-10-10 14:39:42 +02:00
Matthieu Gautier
0364951f75 Make kiwix-server multi-threaded. 2017-10-03 16:35:03 +02:00
Matthieu Gautier
a2627e81c4 Merge pull request #78 from kiwix/patch-1
Look for renamed kiwix-compile-resources script as well
2017-09-27 19:15:57 +02:00
Kunal Mehta
cd72a2d73c Look for renamed kiwix-compile-resources script as well
See https://github.com/kiwix/kiwix-lib/pull/76
2017-09-27 19:10:57 +02:00
Matthieu Gautier
fa3f33d3c7 Use sudo to install pip dependencies in travis 2017-09-27 19:03:11 +02:00
Matthieu Gautier
a210cb3a4b Merge pull request #68 from kiwix/css_taskbar
Css taskbar
2017-08-15 15:51:09 -04:00
Matthieu Gautier
63cb47247b Serve the taskbar css as separated file.
For firefox, the file encoding must be specified in the first 1024 bytes.
If it is not, firefox will reload the page when it founds it.

By inserting the taskbar's css directly in the html, we are "moving" down
the encoding of the page, and the encoding is not inside the first 1024
bytes.

This also improve a bit the performance as the browser can cache the css
file and it's avoid us to send the css in earch html file.
2017-08-15 15:15:26 -04:00
Matthieu Gautier
3220ee1276 Move <link> tag in <head> tag.
In html, the link tag should be in head tag, not in the body tag.
2017-08-15 15:08:56 -04:00
Matthieu Gautier
4a1b9cbfa9 Merge pull request #67 from kiwix/no_globalsearch_on_zim
Do not do globalSearch if the zim file has no full text index.
2017-08-15 14:54:35 -04:00
Matthieu Gautier
f2b5904221 Do not do globalSearch if the zim file has no full text index.
Global search is made only on the global task bar.
Task bar display in the article should provide full text search only
if the zim file has associated full text index.

This is done by having a `NULL` searcher. However, commit `558a0375`
return the globalSearcher if no searcher is associated to a zim.

This commit associate a `NULL` searcher to the zim, so we will not use
the globalSearcher.
2017-08-13 11:35:57 -04:00
Matthieu Gautier
f44722fbbc Merge pull request #64 from kiwix/fix_protocol
Correctly set ProtocolPrefix and SearchProtocolPrefix for searcher.
2017-08-11 00:44:28 -04:00
Matthieu Gautier
0cfcc59437 Update to new kiwix-lib API about Searcher instantiation.
`kiwix-lib` remove `setContentHumanReadableId` method in favour of
specifying directly it in the constructor.
2017-08-10 09:45:08 -04:00
Matthieu Gautier
7776eafbfc Correctly set ProtocolPrefix and SearchProtocolPrefix for searcher.
Default `protocolPrefix` for the kiwix-lib searcher is `zim:://`.
We have to change it to `/` for all searcher we create else the search's
results will have a `zim://...` url, which will obviously won't work.
2017-08-09 20:20:56 -04:00
Matthieu Gautier
5989146931 Merge pull request #49 from kiwix/globalSearch
Global search
2017-07-19 09:54:31 +02:00
Matthieu Gautier
ea088b21a4 Introduce a global taskbar on the welcomeHTML page to allow global search.
Global search is a search on all zims.
2017-07-17 18:24:27 +02:00
Matthieu Gautier
558a0375b0 Use a globalSearcher to do multi search on all zims. 2017-07-17 18:23:12 +02:00
Matthieu Gautier
5f0a05e8d8 Add a global_taskbar.html.part file to be use as taskbar in library home.
This is a simplified version of taskbar.html.part without the buttons
(specific to the current read zim)
2017-07-17 18:20:55 +02:00
Matthieu Gautier
4b9dc39c49 Use only one lock to acces zim library.
Search can now use reader. So there is no need to have to different locks.
2017-07-17 18:17:33 +02:00
Matthieu Gautier
08f2373360 Merge pull request #48 from kiwix/no_use_of_tree_h
Remove use of tree.h
2017-07-12 14:45:38 +02:00
Matthieu Gautier
82fb6bc4d0 Remove use of tree.h
All code using tree.h where commented.
As tree.h where install by kiwix-lib and we removed it there, let's remove
its use here.
2017-07-12 10:28:40 +02:00
Matthieu Gautier
17eceeff5b Merge pull request #46 from kiwix/format_code
Format code
2017-07-12 10:06:46 +02:00
Matthieu Gautier
aef20d6c96 Move to C++11.
Code and kiwix-lib are C++11. So compile using C++11.
2017-07-12 10:01:25 +02:00
Matthieu Gautier
4e3ff03059 Format all the code using clang-format.
Add a script `format_code.sh` to easily format the code.
2017-07-05 15:52:32 +02:00
Matthieu Gautier
856bfc675a Bump-up the version to 0.2.
Time to make a new release.
0.2
2017-06-27 15:22:33 +02:00
Kelson
7850e79eab Merge pull request #44 from kiwix/custom_welcome_css
custom welcome page css
2017-06-08 13:21:01 +02:00
Emmanuel Engelhart
62769aed57 custom welcome page css 2017-06-08 13:12:31 +02:00
Kelson
29e281209d Merge pull request #43 from Skylsmoi/335/rewrite_welcome_page
rewrite welcome page (fixed histo)
2017-06-08 12:47:55 +02:00
Skylsmoi
0f480d9fb8 fixed boxes size with ellipsis + moved style tag to template + reduced margin/padding 2017-06-08 09:55:11 +02:00
Skylsmoi
1aeeaa2c3b rewrite welcome page 2017-06-07 11:48:21 +02:00
Matthieu Gautier
2fe1a9443c Merge pull request #39 from kiwix/t38
Add --nolibrarybutton option refs #38
2017-06-06 14:40:07 +02:00
Emmanuel Engelhart
569b4d946e Add --nolibrarybutton option 2017-06-04 18:49:55 +02:00
Matthieu Gautier
e51539d161 Merge pull request #36 from kiwix/new_api
Adapt to new kiwix-lib search API.
2017-05-28 23:15:27 +02:00
Matthieu Gautier
f12a731939 Adapt to new kiwix-lib search API. 2017-05-28 23:11:02 +02:00
Matthieu Gautier
d94423964e Merge pull request #34 from kiwix/full_html_document
ZIM/libzim/libkiwix should provide full HTML DOM
2017-05-22 16:00:51 +02:00
Emmanuel Engelhart
af10b665a9 ZIM/libzim/libkiwix should provide full HTML DOM 2017-05-19 20:37:21 +02:00
Kelson
c2d29376d9 Merge pull request #32 from Skylsmoi/336/fix_display_taskbar_save
336/fix display taskbar save
2017-05-16 14:11:28 +02:00
Skylsmoi
fd9c63c76a Merge branch '336/fix_display_taskbar_save' of github.com:Skylsmoi/kiwix-tools into 336/fix_display_taskbar_save 2017-05-16 11:16:26 +02:00
Skylsmoi
4cc46685f7 fix breakpoint for cybook 2017-05-16 11:16:04 +02:00
Kelson
e30da0c0cd Merge pull request #29 from Skylsmoi/336/fix_display_taskbar_save
css rules for taskbar are now more strict
2017-05-07 10:06:27 +02:00
Kelson
70a652e020 Merge branch 'master' into 336/fix_display_taskbar_save 2017-05-06 21:08:38 +02:00
Skylsmoi
97f0c8ec5b added important rules to set the taskbar design 2017-05-02 16:20:59 +02:00
Matthieu Gautier
da83027710 Merge pull request #26 from kiwix/no_ssh_key
Get dependencies from http server, not from ssh.
2017-04-24 17:20:37 +02:00
Matthieu Gautier
ef9b48682b Get dependencies from http server, not from ssh.
`kiwix-build` now publish intermediate dependencies archives in a
http accessible location.

Let's use this location instead of `scp` the archives.
2017-04-24 17:13:42 +02:00