1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-27 02:56:18 -04:00
Commit Graph

87 Commits

Author SHA1 Message Date
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
Witold Filipczyk
c283f8cfd9 Gradual rendering in pager mode. ELinks is almost as good as less.
TODO: cg-log -c | elinks
2006-05-05 21:12:10 +02:00
Witold Filipczyk
6d0fe1e28f lzma files with end of stream marker are handled by allocating
2 MB buffer.
2006-04-07 19:55:07 +02:00
Witold Filipczyk
dd93d35f4c Missing lzma.h 2006-03-25 11:40:09 +01:00
Witold Filipczyk
7d1a966239 lzma encoding support using LZMA SDK. Original lzma executable decompresses faster than this code. I have no idea why. 2006-03-24 12:30:54 +01:00
Jonas Fonseca
2748d043f9 Autogenerate .vimrc files and put the master in config/vimrc
This changes the init target to be idempotent: most importantly it will now
never overwrite a Makefile if it exists. Additionally 'make init' will
generate the .vimrc files. Yay, no more stupid 'added fairies' commits! ;)
2006-01-15 18:38:58 +01:00
Jonas Fonseca
acf2ec806b Remove empty lines in start of header files
A left over from the CVS Id removal. Also, for a few files, normalize the
order in which things are declared in headers.
2005-11-15 11:33:27 +01:00
Laurent MONIN
df065ead80 Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
Jonas Fonseca
c88afeb1c2 path_to_top -> top_builddir 2005-10-20 04:00:35 +02:00
Jonas Fonseca
e39a4342d6 Include $(top_srcdir)/Makefile.lib instead of $(path_to_top)/Makefile.lib
A step towards out of tree builds ...
2005-10-20 01:11:47 +02:00
Jonas Fonseca
94ed6fa754 Finalize and cleanup the denser Makefile format
Convert remaining conditional file building to use

	OBJS-$(CONFIG_FOO) += foo.o

one problem with reverse meaining (in util/) fixed with local 'hack'.

Cleanup and remove stuff which is now default targets.
2005-09-28 12:38:17 +02:00
Jonas Fonseca
1efab31581 Simplify building of and linking with directories
Ditch the building of an archive (.a) in favour of linking all objects in a
directory into a lib.o file. This makes it easy to link in subdirectories
and more importantly keeps the build logic in the local subdirectories.

Note: after updating you will have to rm **/*.a if you do not make clean
before updating.
2005-09-27 21:38:58 +02:00
Jonas Fonseca
b30064c0d0 Rename targets: *-l -> *-local 2005-09-27 21:11:28 +02:00
Jonas Fonseca
1af75f051b Fix conditional building of bzip2 and gzip files 2005-09-27 19:07:44 +02:00
Petr Baudis
4130c42bc9 Typo fix 2005-09-16 12:12:07 +02:00
Petr Baudis
72e2d55c1a Convert src/encoding to ELbuild. 2005-09-16 12:05:51 +02:00
Jonas Fonseca
7462f22635 Remove now obsolete .cvsignore files. 2005-09-15 18:33:20 +02:00
Petr Baudis
0f6d4310ad Initial commit of the HEAD branch of the ELinks CVS repository, as of
Thu Sep 15 15:57:07 CEST 2005. The previous history can be added to this
by grafting.
2005-09-15 15:58:31 +02:00