summaryrefslogtreecommitdiff
path: root/content/urldb.c
Commit message (Collapse)AuthorAgeFilesLines
* remove uneccissary includesVincent Sanders2010-01-291-1/+0
| | | | svn path=/trunk/netsurf/; revision=9931
* Treat decomposed URLs with no path component as being for the path "/".John Mark Bell2009-11-221-0/+7
| | | | svn path=/trunk/netsurf/; revision=9703
* Fix the other half of this NULL dereference issueJohn Mark Bell2009-11-221-1/+2
| | | | svn path=/trunk/netsurf/; revision=9695
* Ensure urldb file handle is closed on error.John Mark Bell2009-11-221-1/+6
| | | | svn path=/trunk/netsurf/; revision=9693
* Don't call memcpy when p->segment is NULLJohn Mark Bell2009-11-221-1/+2
| | | | svn path=/trunk/netsurf/; revision=9687
* - content/urldb.c(auth_data): Removed;John Tytgat2009-08-041-58/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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
* Drop pkg-config on cairo, not needed here. Added const.John Tytgat2009-08-021-2/+2
| | | | svn path=/trunk/netsurf/; revision=8985
* Fix serialisation of page titles.John Mark Bell2009-07-041-1/+1
| | | | svn path=/trunk/netsurf/; revision=8313
* Remove spurious "domain" variable from urldb_iterate_partial().John Mark Bell2009-05-281-4/+4
| | | | | | | Lose unnecessary increment of rptr in cookie domain prefix matching. Record that, in the long term, we need some kind of TLD service to consult so that (e.g.) .co.uk is not considered a valid domain prefix. svn path=/trunk/netsurf/; revision=7600
* Fix url completion when last character in url bar is a /John Mark Bell2009-04-161-6/+7
| | | | svn path=/trunk/netsurf/; revision=7105
* Ensure that neither the current fetch host nor the referrer is an IP address ↵John Mark Bell2009-02-131-3/+15
| | | | | | before attempting to domain match them. svn path=/trunk/netsurf/; revision=6466
* Even fuzzier domain matching.John Mark Bell2009-02-131-23/+45
| | | | svn path=/trunk/netsurf/; revision=6463
* Document the assumption that all URLs passed into urldb are already ↵John Mark Bell2009-02-061-0/+4
| | | | | | normalised. Violate this precondition at your peril. svn path=/trunk/netsurf/; revision=6371
* Let's try that again. Now actually passes the regression tests.John Mark Bell2009-01-311-6/+7
| | | | svn path=/trunk/netsurf/; revision=6317
* Fix urldb_match_path().John Mark Bell2009-01-311-5/+13
| | | | | | Fix test code. svn path=/trunk/netsurf/; revision=6316
* urldb_destroy_path_tree() -> iterationJohn Mark Bell2009-01-311-9/+24
| | | | svn path=/trunk/netsurf/; revision=6315
* urldb_save_cookie_paths() -> iterationJohn Mark Bell2009-01-311-15/+27
| | | | svn path=/trunk/netsurf/; revision=6314
* Initialising variables helpsJohn Mark Bell2009-01-311-1/+1
| | | | svn path=/trunk/netsurf/; revision=6313
* urldb_delete_cookie_paths() -> iterationJohn Mark Bell2009-01-311-18/+35
| | | | svn path=/trunk/netsurf/; revision=6312
* Make urldb_dump_paths iterateJohn Mark Bell2009-01-311-10/+21
| | | | svn path=/trunk/netsurf/; revision=6311
* Make urldb_match_path() iterate.John Mark Bell2009-01-311-13/+16
| | | | svn path=/trunk/netsurf/; revision=6310
* Make urldb_iterate_entries_path use iterationJohn Mark Bell2009-01-301-28/+38
| | | | svn path=/trunk/netsurf/; revision=6304
* Pedantic linewrappingJohn Mark Bell2009-01-301-5/+10
| | | | svn path=/trunk/netsurf/; revision=6303
* Make urldb_iterate_partial_path iterate over the tree and not recurse.John Mark Bell2009-01-301-25/+59
| | | | svn path=/trunk/netsurf/; revision=6302
* This logic looked entirely wrong. Fix it to be more sane. If this breaks ↵John Mark Bell2009-01-301-12/+3
| | | | | | things, blame the lack of commentary. svn path=/trunk/netsurf/; revision=6301
* Minor optimisationJohn Mark Bell2009-01-301-1/+1
| | | | svn path=/trunk/netsurf/; revision=6300
* Iterate when counting/writing out paths.John Mark Bell2009-01-301-68/+103
| | | | svn path=/trunk/netsurf/; revision=6299
* Jump through hoops, potentially squashing warnings.John Mark Bell2008-10-131-4/+11
| | | | svn path=/trunk/netsurf/; revision=5569
* Remove urldb_search_remove. Added hint for where to find it if we need it in ↵Daniel Silverstone2008-10-101-57/+1
| | | | | | future svn path=/trunk/netsurf/; revision=5531
* First round of C89 fixes. Those should be obvious, hope I didn't introduce ↵François Revel2008-07-291-10/+18
| | | | | | any side effect. svn path=/trunk/netsurf/; revision=4788
* Remove two unused functions.James Bursa2008-06-141-53/+0
| | | | svn path=/trunk/netsurf/; revision=4333
* const fixes in plotters and history coreRob Kendrick2008-04-071-1/+1
| | | | svn path=/trunk/netsurf/; revision=4083
* Squash warningJohn Mark Bell2008-03-191-1/+1
| | | | svn path=/trunk/netsurf/; revision=3988
* Drop support for URL file versions below 1.06John Mark Bell2008-03-131-83/+40
| | | | svn path=/trunk/netsurf/; revision=3945
* Forward compatible Cookie file loading/savingJohn Mark Bell2008-03-131-10/+15
| | | | | | Reduce amount of magic numbers svn path=/trunk/netsurf/; revision=3944
* Add testcase for non-fqdn -- already passes, but may as well keep it for ↵John Mark Bell2008-03-031-6/+24
| | | | | | regression testing. svn path=/trunk/netsurf/; revision=3877
* Ensure plq is terminated when looking for an URL path.John Mark Bell2008-01-301-0/+3
| | | | | | Ensure fetchcache_redirect() normalizes the redirect destination. svn path=/trunk/netsurf/; revision=3807
* More work on cookie parser. Our junk value handling is now significantly ↵John Mark Bell2008-01-191-19/+97
| | | | | | | | | | | | | closer to that of other browsers. + Fix infinite loop when encountering a spurious \r + Values are only treated as quoted if the first non-whitespace character is " + Cookies are inserted into the db in the order of receipt. This brings our Cookie: header ordering closer to other browsers (though this strictly shouldn't matter -- no ordering is defined, other than by path specificity) + Fix testcase assertions to cope with new output ordering svn path=/trunk/netsurf/; revision=3709
* Work on cookies to bring our behaviour closer to the spec and other browsers:John Mark Bell2008-01-171-97/+314
| | | | | | | | | | | | | | | | + 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
* The previous fix was broken -- URI paths include the leafname.John Mark Bell2008-01-071-61/+34
| | | | | | | | | Make url_path() return the full path (including the leafname). Defaulted cookie path attributes have the leafname and trailing slash stripped. Add testcase for defaulted path. Fix testcase conditions for paths with leafnames. svn path=/trunk/netsurf/; revision=3693
* Fix potential crash in urldb_dump()John Mark Bell2008-01-071-13/+92
| | | | | | | | Relax 4.3.2(i) checking (Cookie path must be a prefix of URL path). We now permit a cookie path containing the document leafname -- we strip the leafname from the path. Make testsuite build again. Add tests for cookie path checking. svn path=/trunk/netsurf/; revision=3692
* Work around sites sending domain cookies for .foo.com from hosts such as ↵John Mark Bell2007-10-301-5/+20
| | | | | | bar.bat.foo.com, then expecting domain matching to succeed. This causes me pain. svn path=/trunk/netsurf/; revision=3637
* Update all source code file headers to reflect GPL version 2 only and ↵Vincent Sanders2007-08-081-4/+15
| | | | | | contain appropriate licence text svn path=/trunk/netsurf/; revision=3486
* Move the p->parent check in urldb to before the cookie loop. Prevents the ↵Daniel Silverstone2007-06-271-6/+12
| | | | | | cookie stuff exploding on domain cookies with no path. Fixes breakage with visiting launchpad.net svn path=/trunk/netsurf/; revision=3368
* Fix cookie domain matching in unverifiable transactions.John Mark Bell2007-06-101-15/+19
| | | | | | Minor tidying. svn path=/trunk/netsurf/; revision=3337
* Remove the netsurf/ from the include paths and rationalise use of <> vs "" ↵Daniel Silverstone2007-05-301-10/+10
| | | | | | | | | | | | | | 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 warning: field precision should have type 'int', but argument 4 has type ↵James Bursa2007-05-021-1/+2
| | | | | | 'long int'. svn path=/trunk/netsurf/; revision=3262
* 1) Fix corruption of history data structure on cloningJohn Mark Bell2007-04-071-1/+1
| | | | | | | | | 2) Only destroy urldb's thumbnail bitmap if it's not the same as the new one. This needs revisiting at a later date such that the mess surrounding who owns bitmap objects is sorted (and so that urldb doesn't need to know about bitmaps) svn path=/trunk/netsurf/; revision=3243
* Squash memory leakJohn Mark Bell2007-04-051-9/+12
| | | | svn path=/trunk/netsurf/; revision=3235
* Make GTK build compile on FreeBSD.James Bursa2007-01-291-0/+2
| | | | svn path=/trunk/netsurf/; revision=3154