summaryrefslogtreecommitdiff
path: root/content/fetchcache.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove fetchcache.[ch]Daniel Silverstone2010-03-281-1328/+0
| | | | svn path=/trunk/netsurf/; revision=10183
* Merge jmb/new-cache; r=dsilvers,rs=vinceDaniel Silverstone2010-03-281-2/+2
| | | | svn path=/trunk/netsurf/; revision=10180
* Merge r9731:HEAD from branches/MarkieB/gtkmain to trunk.John Mark Bell2009-12-181-1/+2
| | | | svn path=/trunk/netsurf/; revision=9737
* Merge branches/MarkieB/gtkmain to trunk.John Mark Bell2009-12-171-37/+90
| | | | svn path=/trunk/netsurf/; revision=9729
* Squash leak.John Mark Bell2009-12-021-0/+2
| | | | svn path=/trunk/netsurf/; revision=9711
* Avoid potential NULL deferenceJohn Mark Bell2009-11-221-3/+5
| | | | svn path=/trunk/netsurf/; revision=9688
* Realm may be NULL iff there's no WWW-Authenticate header served up with a 401.John Mark Bell2009-11-031-2/+6
| | | | | | | | 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
* - content/urldb.c(auth_data): Removed;John Tytgat2009-08-041-8/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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
* Merge LibCSS port to trunk.John Mark Bell2009-07-231-2/+5
| | | | svn path=/trunk/netsurf/; revision=8752
* Replace parent_url with a pointer to the parent content.John Mark Bell2009-07-101-47/+10
| | | | svn path=/trunk/netsurf/; revision=8428
* It's probably a good idea not to redirect to file:/// URLsJohn Mark Bell2009-03-041-0/+26
| | | | svn path=/trunk/netsurf/; revision=6695
* Pointless warning avoidance.John Mark Bell2009-03-021-11/+22
| | | | svn path=/trunk/netsurf/; revision=6676
* Purge WITH_AUTHJohn Mark Bell2009-02-221-2/+0
| | | | svn path=/trunk/netsurf/; revision=6600
* Purge NETSURF_USE_SSL and WITH_SSLJohn Mark Bell2009-02-221-2/+0
| | | | svn path=/trunk/netsurf/; revision=6599
* Make redirects behave as a NOP wrt the verifiability of fetches.John Mark Bell2009-02-161-2/+20
| | | | | | Apparently, the interweb depends on this. svn path=/trunk/netsurf/; revision=6542
* Remove noisy logging of http headersJohn Mark Bell2008-11-091-2/+0
| | | | svn path=/trunk/netsurf/; revision=5672
* Merged revisions 5309-5406,5409-5422 via svnmerge from Daniel Silverstone2008-09-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn://svn.netsurf-browser.org/branches/vince/netsurf-fb ........ r5309 | vince | 2008-09-13 10:59:10 +0100 (Sat, 13 Sep 2008) | 2 lines first stab at framebuffer frontend ........ r5313 | vince | 2008-09-14 15:08:52 +0100 (Sun, 14 Sep 2008) | 2 lines add line plotters ........ r5314 | vince | 2008-09-14 15:28:12 +0100 (Sun, 14 Sep 2008) | 2 lines add rectangle plot to 16bpp plotters ........ r5315 | vince | 2008-09-14 19:58:57 +0100 (Sun, 14 Sep 2008) | 2 lines improve 16bpp image plot ........ r5316 | vince | 2008-09-15 00:35:32 +0100 (Mon, 15 Sep 2008) | 2 lines abstract the os specific framebuffer init ........ r5317 | vince | 2008-09-15 11:18:51 +0100 (Mon, 15 Sep 2008) | 2 lines first cut of linux frontend ........ r5318 | vince | 2008-09-15 12:01:00 +0100 (Mon, 15 Sep 2008) | 2 lines remove junk includes ........ r5319 | vince | 2008-09-15 12:09:02 +0100 (Mon, 15 Sep 2008) | 2 lines make plotters OS agnostic again ........ r5322 | vince | 2008-09-15 15:55:01 +0100 (Mon, 15 Sep 2008) | 2 lines Linux frontend operates ........ r5323 | vince | 2008-09-15 16:32:47 +0100 (Mon, 15 Sep 2008) | 2 lines abstract out OS specific input ........ r5326 | vince | 2008-09-15 19:21:01 +0100 (Mon, 15 Sep 2008) | 2 lines Improve linux mode setting ........ r5329 | vince | 2008-09-15 21:13:33 +0100 (Mon, 15 Sep 2008) | 2 lines improve text clipping ........ r5339 | vince | 2008-09-16 00:07:57 +0100 (Tue, 16 Sep 2008) | 2 lines possibly fix text clipping issue ........ r5342 | vince | 2008-09-16 00:39:36 +0100 (Tue, 16 Sep 2008) | 2 lines consolidate polygon plotters ........ r5344 | dsilvers | 2008-09-16 10:21:06 +0100 (Tue, 16 Sep 2008) | 1 line Fix up the framebuffer target makefile a bit more, add some config options for it ........ r5345 | dsilvers | 2008-09-16 10:22:19 +0100 (Tue, 16 Sep 2008) | 1 line Ensure the appropriate frontend is selected when building framebuffer ........ r5346 | dsilvers | 2008-09-16 10:27:16 +0100 (Tue, 16 Sep 2008) | 1 line Update build system to support targetting separate framebuffer frontends in different build trees, update executable to be nsfb-blah ........ r5350 | vince | 2008-09-16 17:15:04 +0100 (Tue, 16 Sep 2008) | 1 line Add -g to provide symbols for framebuffer link ........ r5351 | vince | 2008-09-16 17:17:09 +0100 (Tue, 16 Sep 2008) | 1 line framebuffer scheduler now works, plotters tweaked, gui tracks window redraw requirements better, keypresses not duplicated under linux fb ........ r5352 | dsilvers | 2008-09-16 17:38:53 +0100 (Tue, 16 Sep 2008) | 1 line Ensure we only allow one fetcher at a time ........ r5361 | vince | 2008-09-17 11:48:44 +0100 (Wed, 17 Sep 2008) | 2 lines initial cursor support ........ r5362 | vince | 2008-09-17 13:56:47 +0100 (Wed, 17 Sep 2008) | 2 lines add mouse handling ........ r5363 | vince | 2008-09-17 14:14:44 +0100 (Wed, 17 Sep 2008) | 2 lines add framebuffer resources ........ r5364 | vince | 2008-09-17 17:12:21 +0100 (Wed, 17 Sep 2008) | 2 lines add reasonable pointer ........ r5366 | vince | 2008-09-17 17:17:25 +0100 (Wed, 17 Sep 2008) | 2 lines fix pointer alpha ........ r5370 | vince | 2008-09-18 13:43:53 +0100 (Thu, 18 Sep 2008) | 2 lines warning squash and cleanup ready for trunk merge ........ r5375 | vince | 2008-09-19 14:58:43 +0100 (Fri, 19 Sep 2008) | 2 lines Working mouse navigation ........ r5377 | vince | 2008-09-20 14:06:22 +0100 (Sat, 20 Sep 2008) | 2 lines Improve scrolling ........ r5378 | vince | 2008-09-20 14:46:46 +0100 (Sat, 20 Sep 2008) | 2 lines fix redraw issues with scrolling ........ r5380 | vince | 2008-09-20 17:08:43 +0100 (Sat, 20 Sep 2008) | 3 lines Alter panning to use its own flag so it doesnt cause invalid redraw operations ........ r5381 | vince | 2008-09-20 21:52:45 +0100 (Sat, 20 Sep 2008) | 2 lines add dummy framebuffer ........ r5383 | vince | 2008-09-21 00:00:15 +0100 (Sun, 21 Sep 2008) | 2 lines fix segfault when cursor is off teh bottom of teh screen ........ r5384 | vince | 2008-09-21 00:06:08 +0100 (Sun, 21 Sep 2008) | 2 lines fix off by one in pointer fix ........ r5385 | vince | 2008-09-21 00:25:09 +0100 (Sun, 21 Sep 2008) | 2 lines when fixing bloody silly off by one errors remember to fix *both* references ........ r5387 | vince | 2008-09-21 00:38:13 +0100 (Sun, 21 Sep 2008) | 2 lines last try at stopping the pointer segfault ........ r5388 | vince | 2008-09-21 16:24:18 +0100 (Sun, 21 Sep 2008) | 2 lines improve vertical text clipping ........ r5392 | vince | 2008-09-21 23:11:51 +0100 (Sun, 21 Sep 2008) | 2 lines Improve text plotters ........ r5393 | vince | 2008-09-21 23:34:38 +0100 (Sun, 21 Sep 2008) | 2 lines fix 32bpp line plotting ........ r5394 | vince | 2008-09-22 00:00:03 +0100 (Mon, 22 Sep 2008) | 2 lines Fix off by one error in line plotting clipping ........ r5397 | vince | 2008-09-22 13:46:22 +0100 (Mon, 22 Sep 2008) | 2 lines Fix bitmap tileing ........ r5398 | vince | 2008-09-22 17:46:02 +0100 (Mon, 22 Sep 2008) | 2 lines enable knockout renderer ........ r5399 | vince | 2008-09-22 18:43:48 +0100 (Mon, 22 Sep 2008) | 2 lines ensure clipping region lies within window, caused by knockout renderer ........ r5400 | vince | 2008-09-22 19:20:25 +0100 (Mon, 22 Sep 2008) | 2 lines update cursor to one swiped from X windows ........ r5405 | vince | 2008-09-23 09:09:05 +0100 (Tue, 23 Sep 2008) | 2 lines fix vertical scroll limit ........ r5412 | dsilvers | 2008-09-23 10:53:14 +0100 (Tue, 23 Sep 2008) | 1 line Revert noisy fetcher patch ........ r5413 | dsilvers | 2008-09-23 10:58:00 +0100 (Tue, 23 Sep 2008) | 1 line Add header guards ........ r5414 | dsilvers | 2008-09-23 11:31:31 +0100 (Tue, 23 Sep 2008) | 1 line Tidy the region clipping slightly ........ r5416 | dsilvers | 2008-09-23 12:05:00 +0100 (Tue, 23 Sep 2008) | 1 line Rationalise how the framebuffer frontend finds resources and options ........ r5418 | dsilvers | 2008-09-23 13:59:00 +0100 (Tue, 23 Sep 2008) | 1 line Ensure options are overridden after load, and squash an fb_gui.c warning ........ r5419 | dsilvers | 2008-09-23 14:20:07 +0100 (Tue, 23 Sep 2008) | 1 line Support fb_mode and fb_device options ........ r5420 | dsilvers | 2008-09-23 14:21:48 +0100 (Tue, 23 Sep 2008) | 1 line Support option_fb_device in the able frontend ........ r5421 | dsilvers | 2008-09-23 14:25:17 +0100 (Tue, 23 Sep 2008) | 1 line Ensure target_blank is disabled ........ r5422 | dsilvers | 2008-09-23 14:39:00 +0100 (Tue, 23 Sep 2008) | 1 line Rework linux fb frontend to support scanning and opening all event devices for input ........ svn path=/trunk/netsurf/; revision=5423
* First round of C89 fixes. Those should be obvious, hope I didn't introduce ↵François Revel2008-07-291-1/+2
| | | | | | any side effect. svn path=/trunk/netsurf/; revision=4788
* Fix cache controlJohn Mark Bell2008-06-061-10/+27
| | | | svn path=/trunk/netsurf/; revision=4288
* Squash warningJohn Mark Bell2008-06-031-1/+1
| | | | svn path=/trunk/netsurf/; revision=4257
* Move struct cache_data from fetch to content as it is no longer needed by ↵James Bursa2008-06-031-51/+51
| | | | | | fetch. Make it a member instead of pointer in struct content. svn path=/trunk/netsurf/; revision=4246
* Fix freeing of etag data.James Bursa2008-05-311-1/+1
| | | | svn path=/trunk/netsurf/; revision=4229
* Fix handling of cache control dataJohn Mark Bell2008-05-301-2/+11
| | | | svn path=/trunk/netsurf/; revision=4227
* Add new fetch callback FETCH_HEADER for headers and move as much header ↵James Bursa2008-05-301-5/+101
| | | | | | parsing as possible from fetch_curl.c to fetchcache.c. This simplifies fetch_curl.c and will make it possible to store response headers in future. svn path=/trunk/netsurf/; revision=4226
* Launch redirects to unsupported URLs in other applications.John Mark Bell2008-04-191-22/+37
| | | | svn path=/trunk/netsurf/; revision=4098
* Squash warningJohn Mark Bell2008-03-191-1/+1
| | | | svn path=/trunk/netsurf/; revision=3982
* Mark old contents as stale if a conditional request succeeded so they'll be ↵John Mark Bell2008-02-271-0/+19
| | | | | | flushed from the cache as soon as they're unused. svn path=/trunk/netsurf/; revision=3872
* Explicitly mark error pages as non-fresh so they'll get purged from the ↵John Mark Bell2008-02-271-0/+4
| | | | | | cache ASAP. svn path=/trunk/netsurf/; revision=3871
* Add url_fragment to extract fragment from URLJohn Mark Bell2008-02-031-7/+11
| | | | | | | | Optionally allow url_compare to ignore fragments in comparison Fix handling of url_compare result in a few places Fix redirects which contain fragments in the Location header svn path=/trunk/netsurf/; revision=3826
* Make core fetching code handle verifiability of transactionsJohn Mark Bell2008-01-301-4/+46
| | | | | | | | Make core fetching code be responsible for inserting cookies into the urldb Provide accessor to a fetch's parent url (this is defined as being the URL of the verifiable fetch which caused this one to occur) Make fetchcache's 3xx handling use the parent url when spawning new fetches svn path=/trunk/netsurf/; revision=3809
* Ensure plq is terminated when looking for an URL path.John Mark Bell2008-01-301-2/+16
| | | | | | Ensure fetchcache_redirect() normalizes the redirect destination. svn path=/trunk/netsurf/; revision=3807
* Rework handling of HTTP redirects -- we now count the number of redirects ↵John Mark Bell2008-01-281-33/+142
| | | | | | | | | | | | | | | | | | | | followed for a given item and abort if a fixed limit is reached. This fixes sites which have pages that redirect to themselves. Redirect handling is now transparent to clients of fetchcache. The new scheme works as follows: 1) Request content for URL (fetchcache() 2) Start fetch of content (fetchcache_go() 3) If no redirect, continue through LOADING, READY, DONE etc. states as before If redirect, receive NEWPTR for each redirect that occurs, then continue through LOADING, READY, DONE etc. states as before. The upshot of this is that redirects result in extra contents being created. It also means that, until LOADING has been received, the content (and thus the URL being fetched) may change. Therefore, fetchcache clients should expect to have to deal with transient data prior to LOADING occurring. As a necessary side-effect of this, the HTML object URLs and CSS @import URLs are no longer stored alongside the relevant contents. These URLs can be accessed by interrogating the url member of struct content anyway, so it was a rather redundant scheme before. svn path=/trunk/netsurf/; revision=3787
* Update all source code file headers to reflect GPL version 2 only and ↵Vincent Sanders2007-08-081-3/+14
| | | | | | contain appropriate licence text svn path=/trunk/netsurf/; revision=3486
* Remove the netsurf/ from the include paths and rationalise use of <> vs "" ↵Daniel Silverstone2007-05-301-9/+9
| | | | | | | | | | | | | | in includes NetSurf includes are now done with ""s and other system includes with <>s as C intended. The scandeps tool has been updated to only look for ""ed includes, and to verify that the files exist in the tree before adding them to the dependency lines. The depend rule has therefore been augmented to make sure the autogenerated files are built before it is run. This is untested under self-hosted RISC OS builds. All else tested and works. svn path=/trunk/netsurf/; revision=3307
* Fix handling of cookies in unverifiable transactions caused by a redirect ↵John Mark Bell2007-02-021-3/+4
| | | | | | from a fetch into a browser window which was varifiable. svn path=/trunk/netsurf/; revision=3165
* Make GTK build compile on FreeBSD.James Bursa2007-01-291-0/+1
| | | | svn path=/trunk/netsurf/; revision=3154
* Handle cookies in unverifiable transactionsJohn Mark Bell2007-01-271-8/+25
| | | | svn path=/trunk/netsurf/; revision=3151
* Fix parsing error when an empty HTML data is returned. Add HTTP status and ↵James Bursa2007-01-131-0/+1
| | | | | | other information to status bar. svn path=/trunk/netsurf/; revision=3140
* Update project URL.Michael Drake2006-11-271-1/+1
| | | | svn path=/trunk/netsurf/; revision=3073
* Detect attempted fetches using protocols we can't handle.John Mark Bell2006-08-061-4/+36
| | | | | | Mark content in error in a couple of cases that I'd missed ages ago. svn path=/trunk/netsurf/; revision=2816
* Implement component-wise URL comparisonJohn Mark Bell2006-07-021-1/+5
| | | | svn path=/trunk/netsurf/; revision=2697
* Fix conversion of URLs beginning "file://". Additionally, John Mark Bell2006-07-011-6/+2
| | | | | | | file://host/... isn't likely, so assume file://path & convert to file:///path svn path=/trunk/netsurf/; revision=2685
* Fix URL file loading and add support for file:/// URLs to urldbJohn Mark Bell2006-04-121-2/+29
| | | | | | Convert file:/... to file:///... (the former isn't a valid URL) svn path=/trunk/netsurf/; revision=2524
* Unify information databasesJohn Mark Bell2006-04-091-1/+0
| | | | svn path=/trunk/netsurf/; revision=2519
* [project @ 2006-02-23 15:06:53 by jmb]John Mark Bell2006-02-231-6/+20
| | | | | | | | | | Handle invalid SSL certificates better - UI still needs work. Modify fetch callback data parameter type to remove compiler warnings. Constify things. Lose global ssl_verify_certificates option. Fix issue when closing a dialog without input focus. svn path=/import/netsurf/; revision=2092
* [project @ 2006-02-08 00:35:05 by jmb]John Mark Bell2006-02-081-5/+10
| | | | | | Handle case where no cache expiry headers are sent; use (now - last_modified) / 10. This should reduce the frequency of cache entry validation. svn path=/import/netsurf/; revision=2064
* [project @ 2006-02-06 00:10:09 by jmb]John Mark Bell2006-02-061-23/+249
| | | | | | Implement HTTP caching algorithm; this should avoid stale cache entries being used. svn path=/import/netsurf/; revision=2059
* [project @ 2006-01-03 23:26:58 by jmb]John Mark Bell2006-01-031-2/+14
| | | | | | | | Detect and prevent self-referential redirects. This is not a complete solution as it does not handle the likes of page1 -> page2 -> page1 -> ... To solve that probably requires counting the number of redirects a given fetch has made and then bailing once it exceeds some fixed value. From what I can see at present, this will have to be done at the top-level (i.e. browser_window_callback and suchlike). svn path=/import/netsurf/; revision=1978
* [project @ 2005-12-31 04:30:49 by rjw]Richard Wilson2005-12-311-5/+0
| | | | | | Updates to work with new url_store system. svn path=/import/netsurf/; revision=1909
* [project @ 2005-12-11 21:54:30 by bursa]James Bursa2005-12-111-5/+0
| | | | | | Disable some log messages. svn path=/import/netsurf/; revision=1896