1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-07-05 02:45:32 +00:00
Commit Graph

306 Commits

Author SHA1 Message Date
Jonas Fonseca
5f18156708 Change protocol/test to use the shell-based test infrastructure 2007-08-10 13:30:28 +02:00
Jonas Fonseca
d083619988 Fix doxygen warning about list end marker 2007-08-08 14:24:55 +02:00
Jonas Fonseca
4e710a3aa6 Doxygenate main header files of src/protocol/bittorrent 2007-08-08 13:20:26 +02:00
Kalle Olavi Niemitalo
fd902e81da Rewrite wiki to en.wikipedia.org, avoid server bug.
<http://www.wikipedia.org/w/wiki.phtml?search=sue%20lawley>
incorrectly redirects to
<http://en.wikipedia.org/w/wiki.phtml?search=sue%2520lawley>
which searches for "sue%20lawley" rather than "sue lawley".
By using en.wikipedia.org directly, we avoid the server bug.
Prompted by an elinks-users post on 2007-07-27.

I asked on #wikimedia-tech, and www.wikipedia.org does always
redirect to en.wikipedia.org; it does not guess any other
language based on headers or IP addresses or such.  Also, the
redirection exists only for compatibility, and skipping it
avoids a few roundtrips to the server.  So this change is good
even if the server is eventually fixed.
2007-07-30 15:07:20 +03:00
Kalle Olavi Niemitalo
96176a8c77 Declare element types of lists. 2007-07-26 22:47:23 +03:00
Kalle Olavi Niemitalo
d3d2bb26c5 New macro LIST_OF for better Doxygen support. 2007-07-26 22:45:51 +03:00
Jonas Fonseca
39a50f07c0 Add .gitignore file listing the test_uri program 2007-07-24 12:35:11 +02:00
Kalle Olavi Niemitalo
56d3f4ff6c Bug 744: Consume semicolons and fix parameters of stubs.
Most stub protocol handlers were protocol_external_handler_T when they
should have been protocol_handler_T.
2007-07-19 17:07:28 +03:00
Jonas Fonseca
d26b7b0b23 Add stub.o to cleaned files and more protocol module and handler stubs 2007-07-19 15:46:31 +02:00
Kalle Olavi Niemitalo
a2f3ec1ef7 Bug 744: More tests and fix failures. 2007-07-19 14:28:20 +03:00
Kalle Olavi Niemitalo
273ae1ff6d Bug 744: Add tests. There are four failures. 2007-07-19 13:46:47 +03:00
Jonas Fonseca
4f0aaa166e Remove normalization of "//" to "/"
This patch changes normalize_uri() to no replace "//" with "/" in URIs. This
fixed this bug but will also lead to possibility that duplicate entries can
exist in ELinks' cache. ELinks might be able to detect in another way by
hashing the content or something.

[ From attachment 310 of bug 744.  --KON ]
2007-07-19 11:22:01 +03:00
Kalle Olavi Niemitalo
375d8cc905 Win32: Don't check file_is_dir if name ends with backslash. 2007-07-18 00:25:07 +03:00
Kalle Olavi Niemitalo
131cf0dd73 Win32: End local subdir HREFs with "/" not "\".
The href attribute is supposed to be URL and so the directory
separator should not depend on the conventions of the local operating
system.
2007-07-18 00:24:09 +03:00
Kalle Olavi Niemitalo
6117f8a164 Name the exec_on_terminal() fg values. 2007-07-15 23:46:18 +03:00
Kalle Olavi Niemitalo
4e2e8b219f http doc: "e.g." rather than "ie." when it's an example 2007-07-12 00:22:26 +03:00
Kalle Olavi Niemitalo
0cf15ca9d9 URI: Inline check_uri_file.
And reorder the characters in the string given to strcspn(), to match
their expected order in the URI.  This is also how strcspn() is called
elsewhere in uri.c.
2007-06-17 19:50:05 +03:00
Witold Filipczyk
581ef57bb4 URI file: Fixed. CGI scripts work, URI fragments work too. 2007-06-17 19:46:07 +03:00
Witold Filipczyk
4fe68ce6fd uri, file: Commented out broken code.
CGI scripts using GET method didn't work.
2007-06-17 19:45:55 +03:00
Jonas Fonseca
ba66ff37db Simplify TESTDEPS maintainance by adding common objects in Makefile.lib 2007-05-26 14:04:29 +02:00
Jonas Fonseca
8bfab2242e Fix 'make test' dependency when building test utility programs
Problems was caused by undefined symbols:

	src/util/conv.c:308: undefined reference to `is_cp_utf8'
	src/util/conv.c:320: undefined reference to `cp2u'
2007-05-26 13:46:12 +02:00
Kalle Olavi Niemitalo
45d1750d03 Bug 914: Don't let UTF-8 I/O affect internal representations.
Use it for the actual I/O only.  Previously, defining CONFIG_UTF8 and
enabling UTF-8 used to force many strings to the UTF-8 charset
regardless of the terminal charset option.  Now, those strings always
follow the terminal charset.  This fixes bug 914 which was caused
because _() returned strings in the terminal charset and functions
then assumed they were in UTF-8.  This reduction in the effects of
UTF-8 I/O may also simplify future testing.
2007-05-20 15:31:02 +03: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
9955ca8e5a do_smb: URI-encode the username and password.
I tested that this does the right thing for the username "Kalle %50"
(encodes it to "Kalle%20%2550", and libsmbclient then decodes back).
2007-03-25 12:13:46 +03:00
Kalle Olavi Niemitalo
d30eb255ce do_smb: Don't decode_uri.
libsmbclient will decode the URI on its own, so if ELinks does that too,
file names like "2%200" will be incorrectly handled.
2007-03-24 21:19:41 +02:00
Kalle Olavi Niemitalo
2558688456 Merge with http://elinks.cz/elinks.git 2007-03-22 07:48:49 +02:00
Laurent MONIN
90980a944e Mark all module names for translation and include needed header files. 2007-03-21 11:01:06 +01: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
3c6c79a637 show_http_error_document: Generate a charset parameter. 2007-03-20 20:53:03 +02:00
Kalle Olavi Niemitalo
9a8fa9d7db file: Directory listings are in the system charset.
Give them a corresponding Content-Type header.  This must go in
cached->head because cached->content_type is supposed to be just
type/subtype.  It will also be deduced from cached->head, so don't set
it separately.
2007-03-20 20:50:41 +02:00
Kalle Olavi Niemitalo
44adb76799 Use add_string_to_string where applicable. 2007-03-18 20:29:08 +02:00
Kalle Olavi Niemitalo
3ee04479d4 init_directory_listing: Link to original URLs. Decode for display only.
HTML-escape all strings that are not intended to contain markup.
2007-03-18 11:04:02 +02:00
Kalle Olavi Niemitalo
b48a2d660d More const in URI functions.
Not yet all of them, though.
2007-03-18 09:57:29 +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
Kalle Olavi Niemitalo
a495f6d26a Cast the NULL argument of string_concat to unsigned char *.
string_concat reads the args with va_arg(ap, const unsigned char *),
and the NULL macro may have the wrong type (e.g. int).

Many places pass string literals of type char * to string_concat.
This is in principle also a violation, but I'm ignoring it for now
because if it becomes a problem with some C implementation, then so
will the use of unsigned char * with printf "%s", which is so
widespread in ELinks that I'm not going to try fixing it now.
2007-03-11 13:01:50 +02:00
Kalle Olavi Niemitalo
7645a836fc Cast the NULL argument of straconcat to unsigned char *.
straconcat reads the args with va_arg(ap, const unsigned char *),
and the NULL macro may have the wrong type (e.g. int).

Many places pass string literals of type char * to straconcat.  This
is in principle also a violation, but I'm ignoring it for now because
if it becomes a problem with some C implementation, then so will the
use of unsigned char * with printf "%s", which is so widespread in
ELinks that I'm not going to try fixing it now.
2007-03-11 12:59:11 +02:00
Kalle Olavi Niemitalo
a05f7203cd Cast variadic arguments of getml to void *.
getml reads the args with va_arg(ap, void *), and the NULL macro in
particular may have the wrong type.
2007-03-11 12:41:17 +02:00
Kalle Olavi Niemitalo
801d520ddd Fix compiler errors without HAVE_VARIADIC_MACROS. 2007-03-11 12:22:02 +02:00
Kalle Olavi Niemitalo
2b7788614f Type-check button arguments of msg_box.
Don't cast function pointers; calling functions via pointers of
incorrect types is not guaranteed to work.  Instead, define the
functions with the desired types, and make them cast the incoming
parameters.  Or define wrapper functions if the return types don't
match.

really_exit_prog wasn't being used outside src/dialogs/menu.c,
and I had to change its parameter type, so it's now static.
2007-03-10 23:50:56 +02:00
Kalle Olavi Niemitalo
701e7e3e64 cgi: Avoid assertion failure when the POST data is empty. 2007-03-10 16:56:16 +02:00
Witold Filipczyk
035ce283c7 cgi: Fix the possible memleak and close pipes in case of error. 2007-03-10 13:45:56 +02:00
Witold Filipczyk
eef7924ff1 POST method of CGI did not work. It works now. 2007-03-10 13:45:35 +02:00
Kalle Olavi Niemitalo
4c636d74f1 cgi: Ensure correct type of NULL pointer to variadic execl. 2007-03-10 13:19:31 +02:00
Witold Filipczyk
2828d587b2 cgi: set_nonblocking_fd
[ This is part of commit 71adb0e6cc
  from the witekfl branch.  The SMB part is in commit
  36477ffa45, and the FSP part is
  in commit 93f3dc3bbf.  --KON ]
2007-03-10 13:10:35 +02:00
Kalle Olavi Niemitalo
87431832be Document the syntax of protocol.rewrite.default_template. 2007-03-10 12:15:06 +02:00