1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-01 03:36:26 -04:00
Commit Graph

41 Commits

Author SHA1 Message Date
M. Vefa Bicakci
96b3093519 Patch 2: Modifications to the remaining parts of ELinks
[Forward ported to 0.12 from bug 1004 attachment 499.  --KON]
2008-11-01 22:20:25 +02:00
Kalle Olavi Niemitalo
b7d3b4f687 1041: Add ftp_add_unparsed_line: HTML entities and more error checks.
Separate the formatting of unparsed lines from ftp_process_dirlist()
to a new function ftp_add_unparsed_line().  Check for all possible
out-of-memory errors.  Encode HTML metacharacters as entity references
and document how charsets are handled FTP directory listings.
Add a NEWS entry.
2008-09-04 11:21:06 +03:00
Witold Filipczyk
298f3af6c6 1041: Do not show the "Error parsing" on ftp://sunsite.icm.edu.pl/. 2008-09-04 10:24:42 +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
61019c3130 Debian bug 464384: fix OFF_T_FORMAT mismatches on amd64
On AMD64 apparently, off_t is long but ELinks detected SIZEOF_OFF_T == 8
and defined OFF_T_FORMAT as "lld", which expects long long and so causes
GCC to warn about a mismatching format specifier.  Because --enable-debug
adds -Werror to $CFLAGS, this warning breaks the build.  When both
SIZEOF_LONG and SIZEOF_LONG_LONG are 8, ELinks cannot know which type
it should use.

To fix this, do not attempt to find a format specifier for off_t itself.
Instead cast all printed off_t values to a new typedef off_print_T that
is large enough, and replace OFF_T_FORMAT with OFF_PRINT_FORMAT which
is suitable for off_print_T altough not necessarily for off_t.  ELinks
already had a similar scheme with time_print_T and TIME_PRINT_FORMAT.
2008-02-10 11:30:27 +02:00
Laurent MONIN
f0e66866f5 Trim trailing whitespaces. 2007-09-14 15:12:32 +02:00
Kalle Olavi Niemitalo
049cc9c6b3 Bug 941: Survive an unexpected number of 227 or 229 FTP responses.
And document the functions a little.

[ From commit 71ff470f2e in ELinks
  0.11.2.GIT.  --KON ]
2007-04-12 01:02:00 +03:00
Kalle Olavi Niemitalo
62bdfcf732 ftp: Decode strftime results from the system codepage. 2007-03-20 21:34:39 +02:00
Kalle Olavi Niemitalo
ef1d6c563d ftp: Collect HTML formatting parameters into a structure. 2007-03-20 21:30:20 +02:00
Kalle Olavi Niemitalo
c8eccc486b ftp: Allocate a larger buffer for the timestamp string. 2007-03-20 21:28:30 +02:00
Kalle Olavi Niemitalo
9d45ff5be1 ftp: Don't pad the timestamp column with spaces. 2007-03-20 21:26:46 +02:00
Kalle Olavi Niemitalo
c6b8fa7151 ftp, add_file_cmd_to_str: Check errors from string functions.
Use goto for error handling.  Free all strings in the same place.
2007-03-18 09:32:47 +02:00
Kalle Olavi Niemitalo
adfde652b9 Reject CR and LF characters in FTP pathnames. 2007-03-18 08:53:56 +02:00
Witold Filipczyk
3f4de99f16 ftp: ftp didn't handle filenames with spaces. 2007-03-18 08:15:54 +02:00
Jonas Fonseca
7589d4457a Bug 899: Fix size handling in FTP directory listings
This fixes parse_ftp_number to use off_t instead of long to store its
(intermediate) result and return type. It also introduces an OFFT_MAX type
"limit" that is used for validating the size of the parsed number.

A test-case for was added in 37c9bf3f75 to
test-ftp-parser and the patch has been confirmed to fix the test-case by
adamg and me.  This closes bug 899, which is a duplicate of debian bug
403139.
2006-12-18 18:51:57 +01:00
Witold Filipczyk
8615cb529e Added output parameter to the get_filesize_from_RETR. It indicates
whether we ought to add the conn->progress->start to
the conn->est_length. Currently displaying resuming works correctly with
ftp.task.gda.pl and ftp.pld-linux.org.
2006-08-19 09:11:53 +02:00
Witold Filipczyk
77470526ba vsftpd shows total filesize, so I commented out addition.
I know that this is not correct for every server.
Show me ftp sites, where resuming displays wrong filesize.
2006-08-19 00:06:04 +02:00
Witold Filipczyk
2e818771d0 Made directory listings XML compliant 2006-07-31 13:24:39 +02:00
Laurent MONIN
b6e6ac96a3 ftp_process_dirlist(): re-introduce else { ERROR() } part, just drop
#ifdef/#endif.
2006-06-10 01:28:35 +02:00
Laurent MONIN
de2264f712 ftp_process_dirlist(): minor test optiization. 2006-06-10 01:12:38 +02:00
Laurent MONIN
6960fc8feb ftp_process_dirlist(): drop stale debug code, spotted by Miciah. 2006-06-10 00:58:50 +02:00
Miciah Dashiel Butler Masters
14595404d1 ftp_process_dirlist: Rename local variable bufp to line_length. 2006-06-09 21:46:47 +00:00
Miciah Dashiel Butler Masters
71ec83c0de ftp_get_line: Reflow some code. 2006-06-09 21:43:36 +00:00
Miciah Dashiel Butler Masters
2d49225db3 ftp_get_line: Reflow some code. 2006-06-09 21:43:18 +00:00
Miciah Dashiel Butler Masters
e1ea1cf2bb ftp_get_line: Don't update *@len if returning -1. 2006-06-09 21:42:16 +00:00
Miciah Dashiel Butler Masters
ea5b06c329 ftp_process_dirlist: Drop a silly comment. 2006-06-09 21:39:51 +00:00
Miciah Dashiel Butler Masters
4122a97a03 Factor ftp_get_line out of ftp_process_dirlist.
Per Quiznos's suggestion.
2006-06-09 21:38:06 +00:00
Miciah Dashiel Butler Masters
585f7c5f2b ftp_process_dirlist: check for bufl == 0 earlier. 2006-06-09 20:17:57 +00:00
Miciah Dashiel Butler Masters
dafc209c61 Simplify ftp_process_dirlist via memchr. 2006-06-09 20:16:35 +00:00
Witold Filipczyk
1fc28980d7 Parsing filesize on ftp.task.gda.pl 2006-03-16 22:13:40 +01:00
Jonas Fonseca
1735f96a87 FTP, NNTP: Normalize the cache entry before setting the connection state
... so it is normalized when the download callbacks are called.
2006-02-08 20:45:15 +01:00
Jonas Fonseca
94f4b2fd1d DIRLIST: Cleanup macros used in the FTP directory listing 2006-01-30 01:29:40 +01:00
Jonas Fonseca
b567f6a5db DIRLIST: Use directory listing initializer in the FTP protocol module 2006-01-30 01:25:30 +01:00
d18809522e Make elinks tcc (tiny C compiler) friendly.
If you want to try tcc use CC=tcc ./configure and make LD=tcc.
I built ELinks with tcc, but ELinks segfaults.
2006-01-21 21:33:23 +01:00
Laurent MONIN
88de36b8d2 Use mode_t and mode macros everywhere. 2006-01-10 23:36:06 +01:00
Laurent MONIN
88730120ba Define EL_PF_INET and EL_PF_INET6 to identify protocol in use instead
of numeric values.
2006-01-04 18:06:53 +01:00
Laurent MONIN
8b7657deaf Use PF_* instead of AF_* as first parameter of socket(2). 2006-01-04 00:32:58 +01:00
Jonas Fonseca
513c06f2d0 Remove last remains of the built-in FTP parser testing 2006-01-03 01:30:46 +01:00
Jonas Fonseca
90a1440c03 Make a test-ftp-parser test script and remove the 'built-in' one 2006-01-03 01:28:44 +01:00
Laurent MONIN
df065ead80 Remove now useless $Id: lines. 2005-10-21 09:14:07 +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