Commit Graph

463 Commits

Author SHA1 Message Date
Daniel Silverstone
2b1146bcb3 Remove parent from fetches, clearing a todo from llcache.c
svn path=/trunk/netsurf/; revision=10299
2010-04-08 11:47:05 +00:00
Daniel Silverstone
6948496d45 Ensure that aborting or releasing hlcache handles will result in nascent retrieval contexts being cleaned up
svn path=/trunk/netsurf/; revision=10298
2010-04-08 11:21:50 +00:00
John Mark Bell
bba7fbbd9b Abort and release llcache handle on failure to process data.
Make hlcache retrieval ignore erroneous contents.

svn path=/trunk/netsurf/; revision=10296
2010-04-08 07:09:09 +00:00
John Mark Bell
4682f0ccd8 When we've snapshotted an object, make sure we add the *new* object into the list of uncacheable objects, and not the old one. Otherwise, our cache chains end up being corrupted.
svn path=/trunk/netsurf/; revision=10295
2010-04-08 07:08:16 +00:00
Michael Drake
2fba2249ee Add function to test whether hlcache_handle's content is locked.
svn path=/trunk/netsurf/; revision=10287
2010-04-07 18:50:18 +00:00
Michael Drake
bbd757c34a Fix fetch_curl_post_convert() for filename_from_path() returning NULL.
svn path=/trunk/netsurf/; revision=10265
2010-04-07 11:10:55 +00:00
Michael Drake
236b6a15e1 Add mime-type getter.
svn path=/trunk/netsurf/; revision=10259
2010-04-07 09:12:09 +00:00
John Mark Bell
2748fe4f64 Make downloads work again.
svn path=/trunk/netsurf/; revision=10243
2010-04-05 21:35:38 +00:00
John Mark Bell
2dc791a253 Remove redundant content message types and associated data
svn path=/trunk/netsurf/; revision=10241
2010-04-05 10:40:16 +00:00
John Mark Bell
69f02e926f Make the high-level cache drop contents of unacceptable type on the floor.
svn path=/trunk/netsurf/; revision=10238
2010-04-04 17:17:24 +00:00
John Mark Bell
79ce683b4e Most of a stop implementation.
Remaining work:
  1) Clone content_html_data
  2) Cloning content_css_data requires the charset of the old content
  3) Calling hlcache_handle_abort() before a content has been created must clean up the retrieval context.

svn path=/trunk/netsurf/; revision=10236
2010-04-04 12:41:19 +00:00
John Mark Bell
43a99ab683 Constify data parameter to *_process_data
svn path=/trunk/netsurf/; revision=10234
2010-04-03 16:37:36 +00:00
John Mark Bell
49810d8191 Use mutator to modify content's title field.
svn path=/trunk/netsurf/; revision=10231
2010-04-03 11:55:28 +00:00
Vincent Sanders
95e4a737de rationalise the usage of the file scheme
svn path=/trunk/netsurf/; revision=10221
2010-03-31 13:59:57 +00:00
John Mark Bell
9f575c590b Do not abort fetch on receipt of FETCH_ERROR: the fetch has already been destroyed.
Implement LLCACHE_EVENT_ERROR case of hlcache_llcache_callback().

svn path=/trunk/netsurf/; revision=10218
2010-03-30 21:36:39 +00:00
Chris Young
07537e5240 Fix compilation when building WITH_NS_SVG
svn path=/trunk/netsurf/; revision=10213
2010-03-30 18:12:21 +00:00
John Mark Bell
9aca901eb1 The convert stage of a content's state progression no longer reflows the content to the provided dimensions.
It is now defined as converting the content into a state in which it is ready for use.
The user of the content is now responsible for performing an initial reformat (sic) of the content before it can be redrawn.

Purge width/height parameters from hlcache_handle_retrieve/content_convert/*_convert APIs.
Fix up content handlers affected by the above change in semantics.
Ensure that browser_window_callback performs an initial reformat of its content.

svn path=/trunk/netsurf/; revision=10207
2010-03-29 22:33:21 +00:00
John Mark Bell
2a53c4c811 Use hlcache_child_ctx, instead of just hoping that we replicate its members correctly.
Ensure public API documentation is not duplicated.

svn path=/trunk/netsurf/; revision=10206
2010-03-29 21:17:18 +00:00
John Mark Bell
99dee5e3d0 Disable llcache tracing
svn path=/trunk/netsurf/; revision=10201
2010-03-29 06:29:56 +00:00
John Mark Bell
b6f6bc5fdd Fix broken linked list removal.
svn path=/trunk/netsurf/; revision=10200
2010-03-29 06:29:25 +00:00
John Mark Bell
311b458d56 Forbid contents with active fetches from being cleaned.
svn path=/trunk/netsurf/; revision=10199
2010-03-29 06:28:46 +00:00
John Mark Bell
4e2c3a4c39 Exceptionally verbose tracing of llcache operation.
svn path=/trunk/netsurf/; revision=10198
2010-03-29 06:27:37 +00:00
John Mark Bell
57253cdd58 Fixup per review
svn path=/trunk/netsurf/; revision=10196
2010-03-28 23:25:21 +00:00
Daniel Silverstone
66d1418506 Allow us to cache foo?bar when it explicitly allows it. as per rfc2616 13.9
svn path=/trunk/netsurf/; revision=10190
2010-03-28 16:51:47 +00:00
Daniel Silverstone
8effd1cb98 Ensure that finished redirection objects in llcache do not get found by subsequent fetch attempts.
svn path=/trunk/netsurf/; revision=10188
2010-03-28 16:28:28 +00:00
Daniel Silverstone
cb7412181f Replace fetch_poll with llcache_poll throughout. Allow CONTENT_OTHER to complete properly.
svn path=/trunk/netsurf/; revision=10187
2010-03-28 16:00:54 +00:00
Daniel Silverstone
05a4eceae2 Remove fetchcache.[ch]
svn path=/trunk/netsurf/; revision=10183
2010-03-28 15:34:07 +00:00
Daniel Silverstone
270ef59a98 Merge jmb/new-cache; r=dsilvers,rs=vince
svn path=/trunk/netsurf/; revision=10180
2010-03-28 12:56:39 +00:00
Chris Young
033b5d815a Move code which extracts the filename from a given path into frontend.
svn path=/trunk/netsurf/; revision=10139
2010-03-21 13:32:59 +00:00
John Mark Bell
ee833877c5 Rate limit fetch progress notifications.
svn path=/trunk/netsurf/; revision=9962
2010-02-10 00:32:12 +00:00
Vincent Sanders
6990c2cd04 remove uneccissary includes
svn path=/trunk/netsurf/; revision=9931
2010-01-29 11:32:53 +00:00
James Bursa
914eedc11d Don't set proxy option for file: URLs to workaround some versions of libcurl attempting to use it (fixed in latest libcurl). Also unset curl proxy option if it's disabled so the previous xfer's setting isn't retained.
svn path=/trunk/netsurf/; revision=9759
2009-12-25 19:27:22 +00:00
John Mark Bell
b75b2ae8bb Merge r9731:HEAD from branches/MarkieB/gtkmain to trunk.
svn path=/trunk/netsurf/; revision=9737
2009-12-18 20:15:50 +00:00
John Mark Bell
355799ce0b Merge branches/MarkieB/gtkmain to trunk.
svn path=/trunk/netsurf/; revision=9729
2009-12-17 23:55:02 +00:00
John Mark Bell
d88945bc0b Squash leak.
svn path=/trunk/netsurf/; revision=9711
2009-12-02 16:54:17 +00:00
John Mark Bell
d591d8df94 Treat decomposed URLs with no path component as being for the path "/".
svn path=/trunk/netsurf/; revision=9703
2009-11-22 23:25:18 +00:00
John Mark Bell
3f4d79e576 This optimisation was so simple that it was broken.
svn path=/trunk/netsurf/; revision=9696
2009-11-22 14:24:53 +00:00
John Mark Bell
8685cfb3b7 Fix the other half of this NULL dereference issue
svn path=/trunk/netsurf/; revision=9695
2009-11-22 14:21:47 +00:00
John Mark Bell
63848419e2 Ensure urldb file handle is closed on error.
svn path=/trunk/netsurf/; revision=9693
2009-11-22 14:12:03 +00:00
John Mark Bell
eba224e09e Avoid potential NULL deference
svn path=/trunk/netsurf/; revision=9688
2009-11-22 13:52:16 +00:00
John Mark Bell
81c1b0e0df Don't call memcpy when p->segment is NULL
svn path=/trunk/netsurf/; revision=9687
2009-11-22 13:49:43 +00:00
John Mark Bell
54cd21ae0d Realm may be NULL iff there's no WWW-Authenticate header served up with a 401.
Default the realm to the fetch URL in this case. Fixes #2890933

Note for new cache implementation (which is actually capable of utilising response bodies in this situation): if there is no WWW-Authenticate header, serve up the response body immediately -- don't present an authentication dialogue.

svn path=/trunk/netsurf/; revision=9659
2009-11-03 07:03:07 +00:00
John Mark Bell
1c403cb2f8 svgtiny requires separate contents
svn path=/trunk/netsurf/; revision=9615
2009-10-08 12:03:44 +00:00
John Mark Bell
e580e2bea9 Hack around cache issue. The entire cache layer needs a redesign asap.
svn path=/trunk/netsurf/; revision=9460
2009-08-26 11:22:48 +00:00
John Tytgat
2261b616f6 - content/urldb.c(auth_data): Removed;
(prot_space_data): Added, it lives linked in the leaf host_part
  struct and together with its scheme and port (which defins canonical root
  url) and realm this defines a protection space.
  (path_data): Removed auth_data field and replaced by a prot_space_data
  pointer.
  (host_part::prot_space): Added linked list of protection space data
  structs.
  (urldb_get_auth_details): Given an URL fetch fetches its auth.
  (urldb_set_auth_details): Creates or updates the contents of a
  protection space to which given URL belongs.
  (urldb_destroy_host_tree): Delete protection data space structures
  using urldb_destroy_prot_space.
  (urldb_destroy_prot_space): Added.
- content/urldb.h(urldb_get_auth_details): Added realm parameter.
- content/fetchers/fetch_curl.c(fetch_curl_set_options): Update
  urldb_get_auth_details call (we don't know realm at this point).
- content/fetchcache.c(fetchcache_callback, fetchcache_auth): At FETCH_AUTH,
  use realm to determine if we really don't know auth data and if so,
  refetch content.
- content/content.h(struct content): Add content::tried_with_auth.
- content/content.c(content_create): Initialize content::tried_with_auth.
- riscos/401login.c(ro_gui_401login_open): Show known authentication
  data in dialogue so user can see what was wrong with it and correct it.

Solves bug #2830829.

svn path=/trunk/netsurf/; revision=9045
2009-08-04 23:02:23 +00:00
John Tytgat
9d678ef7cd Drop pkg-config on cairo, not needed here. Added const.
svn path=/trunk/netsurf/; revision=8985
2009-08-02 12:07:29 +00:00
Chris Young
0cd96bdd5e Correct definition
svn path=/trunk/netsurf/; revision=8899
2009-07-29 22:00:07 +00:00
Chris Young
d2c29dbe95 Keep a copy of the next_fetcher pointer to avoid a situation where the fetch gets
freed during the poll routine and the next pointer can no longer be read.

svn path=/trunk/netsurf/; revision=8898
2009-07-29 18:51:35 +00:00
John Mark Bell
ddeadd1c02 Merge LibCSS port to trunk.
svn path=/trunk/netsurf/; revision=8752
2009-07-23 23:05:34 +00:00
John Mark Bell
5feb7018c5 Replace parent_url with a pointer to the parent content.
svn path=/trunk/netsurf/; revision=8428
2009-07-10 00:26:37 +00:00