Commit Graph

40 Commits

Author SHA1 Message Date
Michael Drake 5e97a3cb26 API: Don't expose urldb_{g|s}et_auth_details to frontends. 2018-08-15 07:29:58 +01:00
John-Mark Bell a6014cae15 HSTS: support policy in urldb 2018-04-22 11:39:12 +00:00
Vincent Sanders 8fb2fc6fc3 rationalise history icon bitmap handling to ensure correct lifetime 2017-09-10 16:06:38 +01:00
Vincent Sanders 4e750bdab6 fix doc comment spelling mistake 2017-03-28 11:45:24 +01:00
Vincent Sanders 27aa56cbf6 make the urldb content type setting API return an error 2017-03-13 21:55:39 +00:00
Vincent Sanders 92b5f114ba make urldb persistance setting API return an error 2017-03-13 21:19:59 +00:00
Vincent Sanders 5078bffad7 change urldb_set_title API to return an error status 2017-03-13 16:38:24 +00:00
Vincent Sanders 0da0dcc342 remove urldb_add_host and path from public API
The urldb_add_host and urldb_add_path API were only public for the
urldb test code which was calling them incorrectly in any case as the
url bloom filters were not updated so serialising and adding data to
entries was inconsistent.

This also changes the tests to use the urldb_add_url API which is less
buggy and results in a smaller, cleaner urldb API.
2017-03-08 13:27:00 +00:00
Vincent Sanders b78887c7c8 make update data api return an result 2017-03-08 13:13:21 +00:00
Vincent Sanders 115985f069 extend url database unit testing to cover more API 2016-08-09 12:26:37 +01:00
Vincent Sanders 976eca9958 msplit public url database API out for frontends 2016-06-13 23:34:45 +01:00
Vincent Sanders 76a68d7dd0 Update content to split public and internal API 2016-06-06 09:01:38 +01:00
Vincent Sanders cf7abb4a0a restructure urldb source
remove forward declarations and restructure. exported functions are
also now documented in the urldb.h header.
2014-11-01 23:27:29 +00:00
Vincent Sanders 14e2829489 remove the die API from the core.
The die() API for abnormal termination does not belong within the core
of netsurf and instead errors are propogated back to the callers.

This is the final part of this change and the API is now only used within
some parts of the frontends
2014-10-26 12:42:53 +00:00
Vincent Sanders db01637343 remove content include from urldb header 2014-07-17 00:18:44 +01:00
Vincent Sanders 776d0b90a1 improve comment to indicate what API is for 2013-10-23 13:49:33 +01:00
Daniel Silverstone 413248d0fc Rough implementation of httponly cookie support 2012-11-09 11:38:46 +00:00
Michael Drake e9b207c658 Port urldb to nsurl. Won't build since rest of NS needs ported to new urldb API.
+ urldb API now takes URLs as nsurl, rather than string.
+ urldb internally stores full URLs with nsurl ref.
+ urldb internally stores schemes as lwc_string.
+ Load and save of cookies and URL file may be slower since
  we now need to create a nsurl.
+ Everything else should be faster, and there should be much
  less allocating/freeing and much less parsing of the same
  url over and over again.
+ Updated urldbtest for new urldb API.
+ urldbtest now cleans up at the end
+ Added lwc_string itterator to end of urldbtest
+ Adding some broken URLs (such as http:domain/) will now
  work, since nsurl fixes (http://domain/) them.
2012-10-08 20:22:04 +01:00
John Mark Bell 6173bb0e6c Merge treeview-redux to trunk
svn path=/trunk/netsurf/; revision=10865
2010-10-05 19:14:46 +00:00
Vincent Sanders 4b329697f7 move url database test to test directory
svn path=/trunk/netsurf/; revision=10589
2010-06-29 07:20:12 +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
James Bursa f87138e5de Remove two unused functions.
svn path=/trunk/netsurf/; revision=4333
2008-06-14 23:17:50 +00:00
John Mark Bell fbb483e0ff Fix type of value_was_quoted member of cookie_data struct.
svn path=/trunk/netsurf/; revision=4166
2008-05-16 10:27:01 +00:00
Rob Kendrick 59641def82 const fixes in plotters and history core
svn path=/trunk/netsurf/; revision=4083
2008-04-07 11:15:09 +00:00
John Mark Bell e5e2eb09f6 Work on cookies to bring our behaviour closer to the spec and other browsers:
+ Improve handling of quoted cookies -- now processes nested quotes correctly
  + Improve cookie output -- now knows which version it's outputting for and 
    processes things appropriately
  + Add assertion that we're dealing with a domain cookie in the case where the
    cookie domain and URL host part don't match during validation.
  + Tidy up fix for broken domain cookie setting -- it's now less confusing to 
    read.
  + Preserve cookie value quoting, regardless of its necessity.
  + Modify Cookie file format to save value_was_quoted flag -- version number 
    bumped to 101.
  + Add more testcases.

svn path=/trunk/netsurf/; revision=3708
2008-01-17 20:00:55 +00:00
Vincent Sanders 2f864eeecc Update all source code file headers to reflect GPL version 2 only and contain appropriate licence text
svn path=/trunk/netsurf/; revision=3486
2007-08-08 16:16:03 +00:00
Daniel Silverstone 6807b4208a Remove the netsurf/ from the include paths and rationalise use of <> vs "" 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
2007-05-30 22:39:54 +00:00
John Mark Bell df4dbaf4cf Handle cookies in unverifiable transactions
svn path=/trunk/netsurf/; revision=3151
2007-01-27 20:58:20 +00:00
John Mark Bell 5b3f0755f6 Add URLdb destruction functionality
svn path=/trunk/netsurf/; revision=3115
2006-12-08 22:38:46 +00:00
Michael Drake ba23e4b693 Update project URL.
svn path=/trunk/netsurf/; revision=3073
2006-11-27 15:35:18 +00:00
Richard Wilson 74fa727509 Experimental new frames code.
svn path=/trunk/netsurf/; revision=2906
2006-09-02 15:52:41 +00:00
Richard Wilson 0309e937e6 Allow the user to delete cookies.
svn path=/trunk/netsurf/; revision=2770
2006-07-16 21:42:37 +00:00
Richard Wilson 9294938976 Extent cookie_update API to allow notification of deleted domains. Fix nodes not being re-calculated.
svn path=/trunk/netsurf/; revision=2765
2006-07-16 16:10:43 +00:00
Richard Wilson a836591435 Add basic cookie viewer, make trees use textarea components for UTF8 editing, trim headers, fix tree redraw issues.
svn path=/trunk/netsurf/; revision=2739
2006-07-13 12:46:02 +00:00
John Mark Bell a63221a624 Rewrite cookie parser to be more tolerant of junk input
No longer need urldb_init; remove it.

svn path=/trunk/netsurf/; revision=2643
2006-06-24 15:44:48 +00:00
John Mark Bell 4f249f9d0a Merge cookies changes into head - unvalidated transactions and a UI
still need implementing.

svn path=/trunk/netsurf/; revision=2632
2006-06-19 21:49:25 +00:00
John Mark Bell c1dbdad995 Provide persistent flag for urldb entries.
Make hotlist use this, rather than abusing the last visited date.
This fixes the hotlist being copied to global history issue.

svn path=/trunk/netsurf/; revision=2619
2006-06-14 22:46:12 +00:00
John Mark Bell e5912fedd1 Use database's copy of URL for new global history entries
svn path=/trunk/netsurf/; revision=2534
2006-04-15 18:53:20 +00:00
John Mark Bell e0ba508992 Store URLs explicitly in URL database for faster access.
Iteration callbacks now passed url_data struct to remove need to look up

svn path=/trunk/netsurf/; revision=2522
2006-04-11 02:39:55 +00:00
John Mark Bell c09eb457df Unify information databases
svn path=/trunk/netsurf/; revision=2519
2006-04-09 23:21:13 +00:00