1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-25 01:05:37 +00:00
Commit Graph

135 Commits

Author SHA1 Message Date
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
abe4927d69 1022: NEWS and option documentation 2008-07-27 20:11:39 +03:00
Kalle Olavi Niemitalo
a83ff1f565 1040: Blacklist servers that support SSL3 but not TLS1.
It seems GnuTLS is not as good at negotiating a supported protocol as
OpenSSL is.  ELinks tries to work around that by retrying with a
different protocol if the SSL library reports an error.  However,
ELinks must not automatically retry POST requests where some data may
have already reached the server; POST is not a safe method in HTTP.
So instead, collect the name of the TLS-incapable server in a blacklist
when ELinks e.g. loads an HTML form from it; the actual POST can then
immediately use the protocol that worked.

It's a bit ugly that src/network/socket.c now uses
protocol/http/blacklist.h.  It might be better to move the blacklist
files out of the http directory, and perhaps merge them with the
BitTorrent blacklisting code.
2008-07-27 01:39:01 +03:00
Kalle Olavi Niemitalo
f45ceff50d NEWS: bug 698 fixed in 0.11.4.GIT too 2008-07-26 12:33:48 +03:00
Kalle Olavi Niemitalo
6b9be71150 1018: Avoid assertion failure in SELECT pop-up for non-current tab
Check in refresh_view() whether the tab is still current; if not, skip
the draw_doc() and draw_frames() calls because draw_current_link()
called within them asserts that the tab is current.  However, do
always call print_screen_status(), because that handles non-current
tabs correctly too.

I think it was not yet possible to trigger the assertion failure with
setTimeout, because input.value modifications by ECMAScript do not
trigger a redraw (bug 1035).
2008-07-22 12:13:27 +03:00
Kalle Olavi Niemitalo
327fc1e46e 1034: NEWS, comments, and tests 2008-07-20 14:34:12 +03:00
Kalle Olavi Niemitalo
83ccaa3673 Bug 698: Keep forms contiguous and non-overlapping and start from 0.
In document.forms, each struct form has form_num and form_end members
that reserve a subrange of [0, INT_MAX] to that form.  Previously,
multiple forms in the list could have form_end == INT_MAX and thus
overlap each other.  Prevent that by adjusting form_end of each form
newly added to the list.

Revert 438f039bda,
"check_html_form_hierarchy: Old code was buggy.", which made
check_html_form_hierarchy attach controls to the wrong forms.
Instead, construct the dummy form ("for those Flying Dutchmans") at
form_num == 0 always before adding any real forms to the list.
This prevents the assertion failure by ensuring that every possible
form_control.position is covered by some form, if there are any forms.

Add a function assert_forms_list_ok, which checks that the set of
forms actually covers the [0, INT_MAX] range without overlapping,
as intended.  Call that from check_html_form_hierarchy to detect
any corruption.

I have tested this code (before any cherry-picking) with:
- bug 613 attachment 210: didn't crash
- bug 714 attachment 471: didn't crash
- bug 961 attachment 382: didn't crash
- bug 698 attachment 239: all the submit buttons showed the right URLs
- bug 698 attachment 470: the submit button showed the right URL

(cherry picked from commit 386a5d517b)
2008-07-20 11:46:01 +03:00
Kalle Olavi Niemitalo
85bfba4530 SEE: Do not check thisobj->objectclass in window functions.
init_js_window_object() copies the alert, open, and setTimeout methods
from the window object to the global object.  My fix for bug 846 on
2006-12-10 incorrectly made the corresponding C functions refuse to
work if they were not called as methods of the window object.
2008-07-20 09:26:52 +03:00
Kalle Olavi Niemitalo
39a5d68447 952, 954: Describe in NEWS. 2008-07-19 14:58:11 +03:00
Kalle Olavi Niemitalo
887a751441 1033: Mention in NEWS. 2008-07-16 17:15:12 +03:00
Kalle Olavi Niemitalo
2668602edc 1031: Mention in NEWS. 2008-07-16 14:55:31 +03:00
Kalle Olavi Niemitalo
e9d4d3aef2 Fix crash after a tab was opened during reload.
Commit 0b99fa70ca "Bug 620: Reset form
fields to default values on reload" made render_document() decrement
vs->form_info_len to 0 while vs->form_info remained non-NULL.
copy_vs() then copied the whole structure with copy_struct and did not
change form_info because form_info_len was 0.  Both view_state
structures had form_info pointing to the same memory block, causing a
segfault when destroy_vs() tried to free that block a second time.

Reported by أحمد المحمودي.
2008-07-15 11:43:03 +03:00
Kalle Olavi Niemitalo
6b05cdb3a0 1030: List the bug in NEWS.
(cherry picked from commit 295c7760f7)
2008-07-14 22:38:52 +03:00
Kalle Olavi Niemitalo
ddd36cafb4 Bug 1029: List in NEWS. 2008-07-12 01:59:18 +03:00
Kalle Olavi Niemitalo
079b97d21b Bug 1026: Protect callback of elinks.load_uri from GC 2008-07-12 01:37:51 +03:00
Kalle Olavi Niemitalo
12bb8fdfe7 NEWS: sync from 0.11.4.GIT
http://elinks.cz/release.html is generated from NEWS of elinks-0.12;
thus we should have all the news of 0.11.4.GIT here too.
2008-07-11 22:22:27 +03:00
Kalle Olavi Niemitalo
4649d0ccba Bug 951 should not be removed from NEWS before 0.12.0.
That's because the bug was in 0.11.4 as well.
2008-07-11 19:09:07 +03:00
Kalle Olavi Niemitalo
fd27acf784 Bug 1027, SMJS: make null mean "none" in elinks.keymaps
elinks.keymaps.main["/"] = null;
used to crash ELinks with a segfault in JS_ObjectIsFunction.
Fix that by recognizing JSVAL_NULL explicitly and treating it as "none".
Likewise, if keymap_get_property would return "none" to ECMAScript,
return JSVAL_NULL instead.
2008-07-11 17:08:35 +03:00
Kalle Olavi Niemitalo
314a41588c Bug 951: weaken pointer from JSObject to cache_entry
The SpiderMonkey scripting module handles the "pre-format-html" event
by constructing a JSObject for the struct cache_entry and then calling
elinks.preformat_html(cache_entry, view_state) if such a function
exists.  The problem with this was that each such JSObject kept the
struct cache_entry locked until SpiderMonkey garbage-collected the
JSObject, even if the user had not defined an elinks.preformat_html
function and the JSObject was thus never needed at all.  To work
around that, the SpiderMonkey scripting module ran a garbage
collection whenever the user told ELinks to flush caches.

Remove the SpiderMonkey scripting module's use of object_lock and
object_unlock on struct cache_entry, and instead make the pointers
weak so that ELinks can free the cache_entry whenever it wants even if
a JSObject is pointing to it.  Each cache_entry now has a pointer back
to the JSObject; done_cache_entry calls smjs_detach_cache_entry_object,
which follows the pointer and detaches the cache_entry and the JSObject
from each other.

This commit does not yet remove the workaround mentioned above.
2008-07-07 23:24:43 +03:00
Kalle Olavi Niemitalo
9c73f02083 NEWS: mention bug 1021, sync with 0.11.4.GIT
Because http://elinks.cz/release.html is made from this file,
I think we'll have to list both 0.11.4.GIT and 0.12pre1.GIT
even though it's a bit difficult to explain which fixes are
in which releases.
2008-07-04 23:01:42 +03:00
Kalle Olavi Niemitalo
aa681786d9 NEWS: list bug 955; add 0.12pre1.GIT section 2008-07-03 13:48:08 +03:00
Kalle Olavi Niemitalo
26a0afd8ae NEWS: 0.12pre1 was released on 2008-07-01 2008-07-01 15:31:39 +03:00
Kalle Olavi Niemitalo
c0ef72117d ELinks 0.12pre1 2008-07-01 03:11:44 +03:00
Kalle Olavi Niemitalo
d2a263ad4f NEWS: remove commented-out sections 2008-07-01 03:02:38 +03:00
Kalle Olavi Niemitalo
e0ffe66677 NEWS: 0.11.4 released, 674 and 770 fixed, 451 bogus 2008-06-21 01:49:34 +03:00
Kalle Olavi Niemitalo
ed17eb18df Bug 1016: Avoid JSFunctionSpec.
(cherry picked from commit 6bfaa7ca8d)

Conflicts:

	src/ecmascript/spidermonkey/form.c
	src/scripting/smjs/elinks_object.c
2008-06-17 00:25:59 +03:00
Kalle Olavi Niemitalo
28d2c6ef9a NEWS update, from elinks-0.11 and otherwise 2008-06-15 23:07:58 +03:00
Kalle Olavi Niemitalo
c2cf48f9e6 NEWS: bug 917 was fixed, but was not in previous versions 2008-06-15 20:13:18 +03:00
Kalle Olavi Niemitalo
04f62c1ebb NEWS: Enhancement 121 (internal copiousoutput) was reverted.
I am reverting all copiousoutput support because of bug 917.
2008-06-15 14:41:47 +03:00
Kalle Olavi Niemitalo
a833d6d093 Bug 1015: Define and use Py_ssize_t. 2008-06-09 23:18:03 +03:00
Kalle Olavi Niemitalo
5e4a565603 Bug 1014: Fix incompatible pointer type in init_perl.
The second argument of PERL_SYS_INIT3 should be a char ***
but ELinks was giving it a char *(*)[1].

Also, enlarge the array to 2 elements, so that my_argv[my_argc] == NULL
like in main().  PERL_SYS_INIT3 seems hardly documented at all so I'm
not sure this is necessary, but it shouldn't hurt.
(cherry picked from commit 8d0677e76a)
2008-06-08 20:40:17 +03:00
Kalle Olavi Niemitalo
2e1df1dc78 Bug 1012: Compile with -fno-strict-overflow or -fwrapv.
(cherry picked from commit b7312e6882)
2008-05-10 23:31:05 +03:00
Kalle Olavi Niemitalo
be3d0d1be0 NEWS: temporarily mention bug 991 2008-04-28 22:05:17 +03:00
Kalle Olavi Niemitalo
2463c1b2f8 Bug 939: Documented the fix.
The fix itself is in the parent commit.
(cherry picked from commit 4c390589ea,
 rewriting the NEWS entry because the bug also occurred on Debian)
2008-04-28 11:04:27 +03:00
Kalle Olavi Niemitalo
1ab670cfce NEWS: the elinks-0.11 branch is at 0.11.4rc1.GIT already 2008-04-28 11:03:40 +03:00
Kalle Olavi Niemitalo
2f79826bc0 NEWS: mention bug 1000
(cherry picked from commit 74c22adc69)
2008-03-02 17:45:30 +02:00
Kalle Olavi Niemitalo
b18190d01a Bug 1003: fix bug number in previous commit
(cherry picked from commit 0bb128238e)
2008-03-01 17:27:13 +02:00
Kalle Olavi Niemitalo
8b5de30f72 Bug 1001: fix uninitialized-pointer crash in URI rewriting
(cherry picked from commit 6d2e034007)
2008-03-01 16:09:41 +02:00
Kalle Olavi Niemitalo
79b69e0bf9 encoding: documentation 2008-02-24 20:45:33 +02:00
Kalle Olavi Niemitalo
a9da2d5802 NEWS: mention bug 534 2008-02-17 21:54:19 +02:00
Kalle Olavi Niemitalo
1127b66240 NEWS update 2008-02-17 21:49:09 +02:00
Y Giridhar Appaji Nag
4a1e296c3b Bug 1002: Fix build failure on Debian GNU/Linux arch powerpc
Change char id to enum bittorrent_message_id id to prevent FTBFS on
powerpc and s390
(cherry picked from commit 01b0c81227,
 with a conflict)
2008-02-10 14:34:21 +02:00
Kalle Olavi Niemitalo
6555359f8e Debian bug 464384: fix cast warning in ssl_connect
There are warnings about casts in the Debian amd64 build logs:
http://buildd.debian.org/fetch.cgi?&pkg=elinks&ver=0.11.3-2&arch=amd64&stamp=1200348983&file=log

	[CC]   src/intl/gettext/dcigettext.o
/build/buildd/elinks-0.11.3/src/intl/gettext/dcigettext.c: In function '_nl_find_msg':
/build/buildd/elinks-0.11.3/src/intl/gettext/dcigettext.c:745: warning: cast from pointer to integer of different size
/build/buildd/elinks-0.11.3/src/intl/gettext/dcigettext.c:746: warning: cast from pointer to integer of different size
...
	[CC]   src/network/ssl/socket.o
/build/buildd/elinks-0.11.3/src/network/ssl/socket.c: In function 'ssl_connect':
/build/buildd/elinks-0.11.3/src/network/ssl/socket.c:219: warning: cast to pointer from integer of different size

The warnings in _nl_find_msg were caused by alignof, which I already
fixed.  This commit ought to fix the gnutls_transport_set_ptr call in
ssl_connect.  This warning did not yet happen in bug 464384 because
the others broke the build before it got that far.
2008-02-09 15:19:20 +02:00
Kalle Olavi Niemitalo
d529a1f24d NEWS sync from 0.11.4rc0.GIT
Specifically 0.11.4rc0.GIT (c72730628a).
I changed the heading for that version though.
2008-02-09 14:11:50 +02:00
Laurent MONIN
9ba7079735 Patch: fix for bug 938
This patch prevents  handle_itrm_stdin() and clear_handlers(itrm->in.std) to be
called when -remote is set and in.std < 0.
It adds two assertions for in.std >= 0 in handle_itrm_stdin() and
unhandle_itrm_stdin().
May be a bad fix, please test and review.

[Added a NEWS entry.  --KON]
2008-02-09 14:11:21 +02:00
Kalle Olavi Niemitalo
3b93dcc472 Debian bug 464384: fix cast warning in alignof 2008-02-09 00:24:45 +02:00
Kalle Olavi Niemitalo
a3d093bd25 Bug 54: Don't disable XON/XOFF flow control.
Do not clear the IXON flag in termios.c_iflag.
Bug 54 did not actually ask for this flag to be kept,
but the cable I am using doesn't seem to have the handshake
lines connected right, so XON/XOFF is a must at 38400 bps,
at least until ELinks learns to send padding based on terminfo.

Any user who has bound actions to Ctrl+S or Ctrl+Q and finds that
they no longer work should just "stty -ixon" before running ELinks.
We don't have any default bindings for those keys, fortunately.
2008-02-04 23:22:15 +02:00
Kalle Olavi Niemitalo
cb1454918a Bug 54: Don't force 8-bit characters and no parity.
Actually, don't use the cfmakeraw function at all,
and don't look for it during configure either.

(cherry picked from commit 87f1661314
 but moved the NEWS entry into the 0.12 section)
2008-02-04 23:19:40 +02:00
Kalle Olavi Niemitalo
7e8e52d33f NEWS: mention bug 503 2008-02-03 20:44:06 +02:00
Kalle Olavi Niemitalo
49ea10a74d Bug 994: Treat only termios.c_cc[VERASE] as "Backspace".
When setting the tty device to raw mode, save the VERASE character.
Later, compare incoming bytes to that.

This is somewhat complicated because "stty verase undef"
sets termios.c_cc[VERASE] = _POSIX_VDISABLE, and e.g. Linux
defines _POSIX_VDISABLE as 0 but that must not cause ELinks
to treat incoming null bytes as backspaces.  Furthermore,
some systems may use different VDISABLE values for different
terminal devices, in which case _POSIX_VDISABLE is undefined
and ELinks must instead read the value from fpathconf().
2008-02-02 13:19:55 +02:00