1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-28 01:35:32 +00:00
Commit Graph

67 Commits

Author SHA1 Message Date
Witold Filipczyk
0fea79cc8f [cflags] Removed -Wno-pointer-sign
Likely some new bugs were introduced by this change.
The long term goal is clean compilation by g++.
2021-01-02 16:20:27 +01:00
Witold Filipczyk
1f57e72212 [mozjs24] Allow build elinks with g++
SpiderMonkey was updated to mozjs24. If you want to build elinks
with ecmascript support, you must compile using g++ with -fpermissive .
There is a lot of warnings.
There are some memleaks in ecmascript code, especially related to JSAutoCompartment.
I don't know yet, where and how to free it.

Debian does not support mozjs24, so I'm going to gradually update SpiderMonkey version.
2020-10-05 20:14:55 +02:00
Witold Filipczyk
5f87bdbcb2 [meson] meson build scripts.
Not finished yet, but I added to motivate myself and others.
The goal is to get a few seconds faster builds.

autotools still will be available.
2020-09-05 22:06:01 +02:00
Witold Filipczyk
94c6c950f7 [zstd] include 2019-11-15 17:09:31 +01:00
Witold Filipczyk
a53486b31d [encoding] Read whole file.zst to memory and decompress. 2019-07-14 22:25:03 +02:00
Witold Filipczyk
90086599da [encoding] Experimental zstd encoding 2019-07-14 18:54:39 +02:00
Witold Filipczyk
3d96b0d7d7 Revert "Compile with C++."
This reverts commit 4f4df33638.
2019-04-21 12:27:40 +02:00
Witold Filipczyk
4f4df33638 Compile with C++.
Weak points:
- alignof
- js problems

Todo:
- make js work with C++ and mozjs-17
- then mozjs-24
- then mozjs-52
- then mozjs-60
- decrease number of warnings
2019-02-17 20:46:16 +01:00
Witold Filipczyk
b1d1e4a15b Fixes related to brotli. Errors occured on https://www.thetrendspotter.net/ 2017-07-02 15:20:03 +02:00
Witold Filipczyk
3e436b8869 brotli code updated 2017-07-01 22:38:06 +02:00
Witold Filipczyk
6eba447e8a Experimental brotli encoding support.
https://github.com/bagder/libbrotli
2015-10-12 23:18:23 +02:00
Witold Filipczyk
66fa83f7b5 deflate once again. 2015-08-22 19:28:50 +02:00
Witold Filipczyk
c84dfd7e18 mem_free_if where aplicable. Initialised memory in encoding/* 2015-05-10 17:27:55 +02:00
Witold Filipczyk
03c4eec1d4 Unitialised variable found by valgrind. 2015-05-09 21:27:12 +02:00
Witold Filipczyk
7453b03279 deflate switched on again.
askubuntu.com uses deflate compression.
2014-09-01 12:50:23 +02:00
Witold Filipczyk
7933724dc8 Removed code using pipes for decompression and simplified decompress_data.
Workarounds for sites, which send incorrect data, probably won't work.
2010-09-24 16:12:35 +02:00
Witold Filipczyk
d157890c0c lzma code requires xz-4.999beta or later. 2010-07-23 14:12:05 +02:00
Witold Filipczyk
3131de4767 Fallback to the raw deflate only when nothing was decompressed so far.
It lets view the site from bug 1017.
2009-02-21 12:27:01 +01:00
Kalle Olavi Niemitalo
a73fe73cd2 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	src/document/document.h
	src/encoding/encoding.c
	src/network/connection.c
	src/protocol/bittorrent/bittorrent.c
	src/protocol/bittorrent/bittorrent.h
	src/protocol/bittorrent/common.h
	src/protocol/bittorrent/connection.c
	src/protocol/bittorrent/dialogs.c
	src/protocol/bittorrent/tracker.c
	src/protocol/file/cgi.c
	src/protocol/http/http.c
2008-08-03 22:18:53 +03:00
Kalle Olavi Niemitalo
6c2e8cd7b2 Bug 1013: Don't assume errno is between 0 and 100000
Replace almost all uses of enum connection_state with struct
connection_status.  This removes the assumption that errno values used
by the system are between 0 and 100000.  The GNU Hurd uses values like
ENOENT = 0x40000002 and EMIG_SERVER_DIED = -308.

This commit is derived from my attachments 450 and 467 to bug 1013.
2008-08-03 17:56:41 +03:00
Kalle Olavi Niemitalo
bbee237ff0 Merge branch 'elinks-0.12' into elinks-0.13 2008-07-20 14:47:40 +03:00
Kalle Olavi Niemitalo
327fc1e46e 1034: NEWS, comments, and tests 2008-07-20 14:34:12 +03:00
Kalle Olavi Niemitalo
b9d48ad7e8 1034: Initialize l in deflate_read to shut up GCC
Avoid this warning:

      [CC]   src/encoding/deflate.o
cc1: warnings being treated as errors
/home/Kalle/src/elinks-0.12/src/encoding/deflate.c: In function ‘deflate_read’:
/home/Kalle/src/elinks-0.12/src/encoding/deflate.c:96: warning: ‘l’ may be used uninitialized in this function
2008-07-20 14:34:11 +03:00
Witold Filipczyk
e213a91bad 1034: Fixed deflate decompression.
First try decompress in zlib format.
If this fails, restart with the raw deflate.
Works for both blogs.msdn.com and for URL of the bug 1034.
2008-07-20 13:58:11 +03:00
Kalle Olavi Niemitalo
5b6c913c6a Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	src/network/connection.h
	src/session/download.c
	src/session/download.h
2008-06-15 21:43:08 +03:00
Kalle Olavi Niemitalo
69cae5d791 Revert "Gradual rendering in pager mode. ELinks is almost as good as less."
I am reverting all /dev/fd recognition because of bug 917.
This reverts commit c283f8cfd9,
except src/protocol/file/file.c still needs #include "osdep/osdep.h"
for STRING_DIR_SEP.
2008-06-15 19:31:29 +03:00
Kalle Olavi Niemitalo
bed84c483e Bug 517: read_encoded() == 0 might not mean EOF if non-blocking.
Without this patch, ELinks showed garbage at
<http://www.dwheeler.com/oss_fs_why.html> when bzip2 decompression was
enabled.  safe_read() in bzip2_read() did not see all of the body
bytes that ELinks had received from the server.  After bzip2_read()
received EAGAIN from safe_read() and returned 0, something skipped
1460 bytes.

decompress_data() apparently assumed that read_encoded() returning 0
meant the end of the file, and returned even though len still was
nonzero, i.e. it had not yet written to the pipe all the data that
the caller (read_chunked_http_data() or read_normal_http_data()) had
provided.  The caller did not know this, and discarded the data.
(cherry picked from commit 7e5e05ca60)
2008-06-07 23:33:23 +03:00
Kalle Olavi Niemitalo
7e5e05ca60 Bug 517: read_encoded() == 0 might not mean EOF if non-blocking.
Without this patch, ELinks showed garbage at
<http://www.dwheeler.com/oss_fs_why.html> when bzip2 decompression was
enabled.  safe_read() in bzip2_read() did not see all of the body
bytes that ELinks had received from the server.  After bzip2_read()
received EAGAIN from safe_read() and returned 0, something skipped
1460 bytes.

decompress_data() apparently assumed that read_encoded() returning 0
meant the end of the file, and returned even though len still was
nonzero, i.e. it had not yet written to the pipe all the data that
the caller (read_chunked_http_data() or read_normal_http_data()) had
provided.  The caller did not know this, and discarded the data.
2008-06-07 21:27:37 +03:00
Kalle Olavi Niemitalo
af9ed54c0f Merge branch 'elinks-0.12' into elinks-0.13 2008-03-01 17:28:37 +02:00
Witold Filipczyk
d8a062cffc http encoding: Moved the accept_encoding_header to the http.c. 2008-02-29 15:32:10 +01:00
Kalle Olavi Niemitalo
3aecdfc095 Content-Encoding: deflate means neither zlib nor gzip header.
deflate.c used to call inflateInit2(stream, MAX_WBITS + 32).
This makes zlib first check for a gzip header, and if it doesn't
find one, assume a zlib header.  However, if the server said
"Content-Encoding: deflate", then neither header is there, and
zlib does not detect this automatically.  So ELinks has to
distinguish between the gzip and deflate encodings, and tell
zlib which one was meant.

This bug resulted in blank pages at blogs.msdn.com accessed
through proxy.suomi.net.
2008-02-27 00:52:24 +02:00
Kalle Olavi Niemitalo
3c861fd530 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	configure.in
	src/protocol/http/http.c
2008-02-24 22:49:47 +02:00
Kalle Olavi Niemitalo
a03698d695 lzma: Set *new_len even if data was truncated.
Commit 474f1f4268 did the same
to bzip2 and deflate.
2008-02-24 20:45:33 +02:00
Witold Filipczyk
902522fbdf content encoding: New function accept_encoding_header. 2008-02-24 20:45:32 +02:00
Witold Filipczyk
8492e6b1af lzma: used the lzma library from tukaani.org. 2008-02-24 20:45:32 +02:00
Kalle Olavi Niemitalo
474f1f4268 encoding: Set *new_len even if data was truncated.
Previously, bzip2_decode_buffer and deflate_decode_buffer left
*new_len unchanged if the compressed input data ended unexpectedly.
This behaviour was also inherited by decode_encoded_buffer,
whose only caller render_encoded_document preinitializes the variable
and so did not crash.

With this change, the functions now store in *new_len the number of
bytes that were successfully decoded, even if more bytes were expected.
An error should perhaps be reported to the user, but I don't think the
previous version did that either, as it returned a non-NULL pointer.
2008-02-17 21:54:19 +02:00
Witold Filipczyk
cfb2ef63d6 encoding: Fixed a chunked decompression and added the deflate. 2008-02-17 21:54:18 +02:00
Laurent MONIN
f0e66866f5 Trim trailing whitespaces. 2007-09-14 15:12:32 +02:00
Miciah Dashiel Butler Masters
ea372bd0cd get_opt_*: Add ses parameter
Add a session parameter to get_opt_ and its wrappers in preparation for session-specific and domain-specific options.
2007-08-28 17:24:59 +00:00
Laurent MONIN
0b98c5051b Fix trailing whitespaces 2007-04-26 15:02:04 +02:00
Kalle Olavi Niemitalo
0e5b6af9b0 Various comments and tweaks in bzip2 decoding.
Do not assume that memset(ptr, 0, size) clears pointers to NULL.
The length of decoded data can be read in two ways; assert they match.
2007-02-24 23:03:47 +02:00
Kalle Olavi Niemitalo
a75302caf2 More const in encoding backends. 2007-02-24 23:03:39 +02:00
Kalle Olavi Niemitalo
20ba46ddde Remove decode_encoded and associated backend functions.
This function was unused and only the dummy backend implemented it
correctly.  Fixing bug 534 will probably require adding this function
back again, but I think it will be easier to do it from scratch than
fix the bogus implementations we had here.
2007-02-24 23:03:24 +02:00
Witold Filipczyk
1e7f26c33d bzip2: buf must be the last. 2007-02-24 16:13:03 +02:00
Witold Filipczyk
728c97556d bzip2: Used the patch from bug the 517.
Removed the bzip2-pipe.patch from contrib.
2007-02-24 16:12:49 +02:00
Witold Filipczyk
cc28da68a7 bzip2: removed unclean my BZ2_bzRead2.
Use the patched bzlib instead. I put the bzip2-pipe.patch
in the contrib directory.
2007-02-24 16:12:31 +02:00
Witold Filipczyk
86b352fecc Simplification. bzf->handle is the same as data->file. 2007-02-24 16:12:17 +02:00
Witold Filipczyk
24a96717a6 BZ_bzRead2 is based on BZ_bzRead from the bzlib library.
Slightly modified to handle reading from the pipe. This fixes the bug 517.
2007-02-24 16:12:11 +02:00
Rich Felker
d2b8e06f41 gzip_read: always call gzclearerr
This is necessary when using a POSIX-compliant stdio implementation, which
will set the FILE error flag when input from the pipe is exhausted, causing
all subsequent reads to fail.
2006-11-05 04:53:42 +00:00
Laurent MONIN
5acb5e6663 Trim trailing whitespaces. 2006-05-31 19:34:49 +02:00