This is another follow-up regression fix that made open and save actions in
the WTD-dialog not function correctly when the connection ended before they
were pressed.
Related: 347970988d
First the patch makes sure doc_loading_callback is always called from
tp_display even if the download is in result state. This is often the
case for local files that the user decides to display via the WTD dialog.
Furthermore, improve the adding to globhist part of doc_loading_callback,
so that it works also for downloads in result state where the
download->conn member is NULL. In addition to grabbing the URI from the
connection try also the cache entry if it is set.
Fixes: bug 355 (Documents displayed via WTD aren't added to globhist)
Commit 9cc9db4e24 broke submit buttons
on HTML forms, so that the server no longer knows which button was
actually pressed.
<kahmalo> The bug with forms seems to be that try_submit_given_form (in
src/viewer/text/link.c) is the only function that runs "onsubmit"
scripts, and it does not care which of the submit buttons was
pressed; it calls submit_given_form which submits based on the first
item of the form. [20:57]
<kahmalo> or last, I don't know how the list works.
<kahmalo> try_submit_given_form could get the control via
get_current_link(doc_view) but I suppose it'd be cleaner to provide
that as a parameter. [20:58]
Originally posted as:
<mid:87ek2heebh.fsf@Astalo.kon.iki.fi>
<nntp://news.gmane.org/87ek2heebh.fsf@Astalo.kon.iki.fi>
<http://permalink.gmane.org/gmane.comp.web.links/2745>
This makes move_download not assume that there is a connection attached
when it is called. This is the case pretty often for file:// downloads when
dialogs are involved (query file) and the reason why it explicitly checks
if the connection state is 'in result state'. Anyway, fill the new download
struct with variabled from the old one instead of taking variables from the
connection struct.
This patch also adds some assertions and a few comments.
This includes setting the new priority and adding the download to the list
of connection downloads. If the connection has no downloads set the
PRI_CANCEL priority; get_priority() requires that.
This simplifies unqueuing of downloads and makes it more obvious that
the 'change' being performed is to migrate or replace an old download
handle with a new one.
Take a quick stroll through the unchartered corners of the DOM node data
structures:
- Remove ununsed struct dom_node_id_item.
- Make the document node reference a future struct dom_document.
- Describe ideas for node data, e.g. the entity reference node should use
it for storing the unicode_val_T.
This ensures that the 'writer' process will remove itself when the
main ELinks process for some reason decides to shutdown the connection.
Before the 'writer' process would complete it's task taking up unnecessary
system resources.
This is mostly an issue when fetching big files. Therefore only file
fetching is fixed. FIXME added about also checking return codes for write
associated with directory listing.
Reported-by: zas
It should be included via elinks.h but apparently some other system header
can prevent this somehow on some systems.
Reported-by: Phillip Pi <ant@zimage.com>
It uses mangleme by Michal Zalewski <lcamtuf@coredump.cx> to generate HTML
which is then fed into the sgml-parser program. By default 100 random HTML
documents are tested. But the test script takes the number of documents
to test against as an argument. Useful for torture testing the SGML parser.
This changes GC checking to use the EL_CHECK_OPTIONAL_LIBRARY macro to
reduce redundancy. This means that there is --with-gc instead of
--enable-gc so you can pass it a path, which is needed on Debian systems
where <gc.h> resides in /usr/include/gc/gc.h.
The macro is adapted accordingly to serve the above purpose. That is,
"$withval/include" and "$withval/lib" is only appended to CFLAGS and LIBS
if they exist (else "$withval" is appended to CFLAGS).
It didn't check that both title and title->text was non NULL. In either
case it now passes "No title" string to add_bookmark().
Reported by Neuromancer.
Tested with both:
<bookmark href="empty://title"><title></title><bookmark>
<bookmark href="no://title"></bookmark>