Commit Graph

441 Commits

Author SHA1 Message Date
Michael Drake
de10eff59c Don't escape '|'.
svn path=/trunk/netsurf/; revision=13162
2011-11-23 16:27:20 +00:00
Michael Drake
04f6957141 Fix handling of bad mailto: urls.
svn path=/trunk/netsurf/; revision=13113
2011-11-03 12:15:32 +00:00
Michael Drake
3ecf3c1eaf Fix empty port separator and redundant port removal when credentials are present.
svn path=/trunk/netsurf/; revision=13108
2011-10-31 22:23:02 +00:00
Michael Drake
a4dc04e44a Test numbers before calling strncmp.
svn path=/trunk/netsurf/; revision=13107
2011-10-31 22:17:05 +00:00
Michael Drake
d64e09aef7 Make sure port's just 80, before removing in http case.
svn path=/trunk/netsurf/; revision=13106
2011-10-31 22:13:38 +00:00
Michael Drake
ea761e16e6 nsurl optimisation: Remove a load of branches into fewer.
svn path=/trunk/netsurf/; revision=13105
2011-10-31 22:02:40 +00:00
Michael Drake
3936e6df15 Remove some code that's not needed. Fix redundant port handling.
svn path=/trunk/netsurf/; revision=13104
2011-10-31 21:47:10 +00:00
Michael Drake
c6f13db858 Don't need to generate string from scratch in nsurl_defragment, just copy.
svn path=/trunk/netsurf/; revision=13103
2011-10-31 21:27:11 +00:00
Michael Drake
f980e6015f nsurl optimisation: Don't use separate allocations for nsurl strings.
svn path=/trunk/netsurf/; revision=13102
2011-10-31 21:13:29 +00:00
Michael Drake
a112bfb676 Function for adding fragment onto nsurl.
svn path=/trunk/netsurf/; revision=13087
2011-10-28 19:18:14 +00:00
John Mark Bell
f90aeba984 Appease ancient Perl installs.
svn path=/trunk/netsurf/; revision=13079
2011-10-24 22:52:12 +00:00
John Mark Bell
da930e48ad Use local variables instead of global filehandles
svn path=/trunk/netsurf/; revision=13068
2011-10-17 21:55:45 +00:00
Michael Drake
62248c06d3 Don't need to rescan authority if there was no scheme. Bring documentation back into sync with code. Make pre-authority slash skipping more robust.
svn path=/trunk/netsurf/; revision=13061
2011-10-15 14:03:13 +00:00
John Mark Bell
5b644acf61 Move timeval_subtract to utils/log.c & make it static, as it's not used anywhere else
svn path=/trunk/netsurf/; revision=13059
2011-10-15 13:11:04 +00:00
John Mark Bell
ee930d97e4 Fix handling of no scheme
svn path=/trunk/netsurf/; revision=13055
2011-10-15 11:51:54 +00:00
John Mark Bell
ca4dfc7f1e Move nsurl test suite into test/
Fix up llcache tester to reflect nsurl changes
Make handling of http:,http:/,http:// consistent
Fix buffer overflow when presented with an input string: "http://"

svn path=/trunk/netsurf/; revision=13051
2011-10-14 21:29:13 +00:00
Michael Drake
c69e75220d Remove unused variable.
svn path=/trunk/netsurf/; revision=13048
2011-10-14 20:54:18 +00:00
Michael Drake
9bf80e3788 Improve bad URL handling.
svn path=/trunk/netsurf/; revision=13045
2011-10-14 13:54:52 +00:00
Michael Drake
0826de092f Fix double inclusion of host/port separator when login credentials are present. Add tests to tester.
svn path=/trunk/netsurf/; revision=13040
2011-10-13 19:39:30 +00:00
Michael Drake
606d7cc64e Add nsurl testing rig.
svn path=/trunk/netsurf/; revision=13035
2011-10-11 14:59:32 +00:00
Michael Drake
9a7b316661 Set scheme_end marker after advance due to leading whitespace.
svn path=/trunk/netsurf/; revision=13034
2011-10-11 14:54:28 +00:00
Michael Drake
624967f30a Pedantic spacing fix.
svn path=/trunk/netsurf/; revision=13009
2011-10-08 13:14:08 +00:00
Michael Drake
642d773e2f Add function to get at url length.
svn path=/trunk/netsurf/; revision=13003
2011-10-08 12:03:54 +00:00
Michael Drake
c8bdbdd2e7 Handle joining to a base with no path.
svn path=/trunk/netsurf/; revision=12983
2011-10-07 21:16:35 +00:00
Michael Drake
3fde9589c1 Remove unused url_normalise() and don't include regex.h.
svn path=/trunk/netsurf/; revision=12971
2011-10-06 12:38:47 +00:00
Michael Drake
fd5ad500c5 Only need to cope with trailing whitespace if it exists.
svn path=/trunk/netsurf/; revision=12969
2011-10-06 11:53:23 +00:00
Michael Drake
1203c4baf2 Ensure trailing whitespace is ignored.
svn path=/trunk/netsurf/; revision=12960
2011-10-05 20:16:19 +00:00
Michael Drake
7d3a84231e Optimise nsurl__is_no_escape.
svn path=/trunk/netsurf/; revision=12957
2011-10-05 15:43:44 +00:00
Michael Drake
7d0b91caa7 Make sure the fragment remover sets the nsurl to NULL on failure.
svn path=/trunk/netsurf/; revision=12956
2011-10-05 12:15:27 +00:00
Michael Drake
921e9959e6 Namespaceing.
svn path=/trunk/netsurf/; revision=12955
2011-10-05 12:13:26 +00:00
Michael Drake
0c30fe98af Handle % in URL without 2 hex digits after.
svn path=/trunk/netsurf/; revision=12953
2011-10-05 09:46:06 +00:00
Michael Drake
20c70fcb90 Fix upper case hex and return -1 for invalid hex.
svn path=/trunk/netsurf/; revision=12952
2011-10-05 09:41:54 +00:00
Vincent Sanders
c18c9b5511 make url character checks table driven and remove expensive strchr
svn path=/trunk/netsurf/; revision=12951
2011-10-05 09:33:56 +00:00
Michael Drake
280ece6df9 Handle upper case hex.
svn path=/trunk/netsurf/; revision=12950
2011-10-05 09:30:12 +00:00
Vincent Sanders
a25f87a739 make nsurl__create_from_section correctly escape characters as per RFC3986
svn path=/trunk/netsurf/; revision=12948
2011-10-04 22:32:04 +00:00
John Mark Bell
170136a4e8 Ensure refcounts add up
svn path=/trunk/netsurf/; revision=12944
2011-10-03 22:13:45 +00:00
Michael Drake
6366f25f0d Remove LOG.
svn path=/trunk/netsurf/; revision=12936
2011-10-03 20:56:35 +00:00
Michael Drake
a522d9ff14 Fix host/path with no scheme.
svn path=/trunk/netsurf/; revision=12935
2011-10-03 20:54:41 +00:00
Michael Drake
898b01e721 More conversion to nsurl. (box->href, object params, imagemaps, (i)frames)
svn path=/trunk/netsurf/; revision=12933
2011-10-03 20:28:29 +00:00
Michael Drake
a595d7c4bb Fix parse of url with host name only.
svn path=/trunk/netsurf/; revision=12925
2011-10-03 11:36:26 +00:00
Michael Drake
2220e1c725 Fragment component doesn't include hash.
svn path=/trunk/netsurf/; revision=12924
2011-10-03 11:35:02 +00:00
Michael Drake
f97d7425a8 lwc version of ring function.
svn path=/trunk/netsurf/; revision=12911
2011-09-29 15:32:39 +00:00
Michael Drake
970d6dd835 Add function to get a nsurl with fragment removed from a nsurl.
svn path=/trunk/netsurf/; revision=12903
2011-09-28 11:26:10 +00:00
Michael Drake
7e7e1f6ed3 Squash erroneous warnings abuout uninitalised variable use from gcc 3.4.6.
svn path=/trunk/netsurf/; revision=12901
2011-09-27 12:08:23 +00:00
Michael Drake
e1f7a37f15 Port fetch layer to nsurl. Remove unused fetch_get_referer function.
svn path=/trunk/netsurf/; revision=12899
2011-09-27 11:07:32 +00:00
Michael Drake
a269a82d1f s/nsurl_get_lwc/nsurl_get_component/
svn path=/trunk/netsurf/; revision=12898
2011-09-27 08:18:32 +00:00
Michael Drake
e90f794706 Add nsurl_get_lwc function.
svn path=/trunk/netsurf/; revision=12894
2011-09-26 21:50:16 +00:00
Michael Drake
75d61bca44 Simply return bool from nsurl_compare.
svn path=/trunk/netsurf/; revision=12889
2011-09-26 14:57:45 +00:00
Michael Drake
47b18439e7 Change if/else if ladder to a switch.
svn path=/trunk/netsurf/; revision=12887
2011-09-26 14:12:19 +00:00
Michael Drake
85e5fcea40 Updated documentation.
svn path=/trunk/netsurf/; revision=12884
2011-09-26 13:29:05 +00:00
Michael Drake
38caddcf93 Add means to find out if a NetSurf URL object contains a given component.
svn path=/trunk/netsurf/; revision=12883
2011-09-26 13:27:20 +00:00
Michael Drake
dc53b47e0b Don't return length from nsurl_access.
svn path=/trunk/netsurf/; revision=12882
2011-09-26 12:19:35 +00:00
Michael Drake
1385dea029 Assert that the url exists before reducing its reference count. Thanks to Martin Bazley.
svn path=/trunk/netsurf/; revision=12865
2011-09-23 09:06:05 +00:00
Michael Drake
2837f05094 nsurl_access must return const.
svn path=/trunk/netsurf/; revision=12863
2011-09-22 20:45:38 +00:00
Michael Drake
828b5b44c7 Simplify nsurl_access and sync implementation with API.
svn path=/trunk/netsurf/; revision=12862
2011-09-22 20:28:26 +00:00
Michael Drake
8c861347c0 Add nsurl_ref for copying, replace nsurl_destroy with nsurl_unref, and add nsurl_access for accessing a pointer to string data internal to the NetSurf URL object.
svn path=/trunk/netsurf/; revision=12861
2011-09-22 16:28:46 +00:00
Michael Drake
9f3a082658 New URL handling (unused atm).
svn path=/trunk/netsurf/; revision=12843
2011-09-21 14:36:42 +00:00
Vincent Sanders
dec633ca8e make high level cache take a parameter structure
make hlcache have a single global container

svn path=/trunk/netsurf/; revision=12779
2011-09-08 12:04:57 +00:00
Michael Drake
4075648e7a Content interface to get at contextual content at point.
svn path=/trunk/netsurf/; revision=12753
2011-09-06 18:07:30 +00:00
John Mark Bell
338544df09 Squash warnings
svn path=/trunk/netsurf/; revision=12721
2011-09-05 07:19:04 +00:00
John Mark Bell
6807fa854d Sniff content types where appropriate.
We never sniff for CSS, nor for non-page artefacts (e.g. treeview icons)

svn path=/trunk/netsurf/; revision=12707
2011-09-04 06:28:09 +00:00
John Mark Bell
3e1bd0d0bf Skip over credentials when lower casing host
svn path=/trunk/netsurf/; revision=12624
2011-07-24 12:11:11 +00:00
John Mark Bell
b34502af82 Refactor http utilities
svn path=/trunk/netsurf/; revision=12595
2011-07-08 08:38:17 +00:00
Michael Drake
eddae6af06 Remove plotter table global. Pass a redraw context around redraw functions. Knockout could be handled better. Note: untested on most front ends.
svn path=/trunk/netsurf/; revision=12543
2011-06-30 15:48:07 +00:00
Michael Drake
b57c2e0bee Move rectangle type to utils/types.h
svn path=/trunk/netsurf/; revision=12525
2011-06-28 15:18:48 +00:00
John Mark Bell
e71691bae8 Merge branches/jmb/content-factory to trunk
svn path=/trunk/netsurf/; revision=12283
2011-05-06 20:40:09 +00:00
John Mark Bell
f55474bf78 Make strchrnul stupid.
svn path=/trunk/netsurf/; revision=12174
2011-04-08 07:18:27 +00:00
John Mark Bell
ff60007458 Fix build with NDEBUG defined
svn path=/trunk/netsurf/; revision=12154
2011-04-03 22:23:14 +00:00
Vincent Sanders
74ffc40e92 move logging initialisation
svn path=/trunk/netsurf/; revision=12152
2011-04-02 13:05:55 +00:00
Vincent Sanders
ad12c46af5 remove extraneous logging
fix windows path_to_url coping with NULL input and allocation errors.
remove forced verbose logging

svn path=/trunk/netsurf/; revision=12147
2011-03-29 20:50:31 +00:00
Vincent Sanders
402aaeb368 make windows frontend use
svn path=/trunk/netsurf/; revision=12146
2011-03-29 20:38:40 +00:00
Michael Drake
66f6e9eff5 Rename utils/resource to utils/filepath to avoid confusion with resource: fetcher.
svn path=/trunk/netsurf/; revision=12088
2011-03-17 11:26:30 +00:00
Vincent Sanders
1da7b161f8 Stop gtk printing from exploding if its unable to initialise the job
add interface to clone a high level cache handle
make generic printing core call new hlcache interface

svn path=/trunk/netsurf/; revision=12068
2011-03-15 22:02:06 +00:00
Daniel Silverstone
1cd4c59f99 Slightly safer operation on RO
svn path=/trunk/netsurf/; revision=12064
2011-03-15 18:43:41 +00:00
Daniel Silverstone
a4b99f5c31 Remove use of POSIX.pm from svn-testament -- RISCOS seems to be incomplete in that respect
svn path=/trunk/netsurf/; revision=12062
2011-03-15 17:55:13 +00:00
Daniel Silverstone
775a139103 And use POSIX::uname for the hostname
svn path=/trunk/netsurf/; revision=12061
2011-03-15 15:49:08 +00:00
Daniel Silverstone
6d2a7a3495 Corify a bunch of svn-testament to work better on RISC OS with a bit of luck
svn path=/trunk/netsurf/; revision=12060
2011-03-15 15:45:18 +00:00
Chris Young
1d764f7bf7 Fix warning
svn path=/trunk/netsurf/; revision=12056
2011-03-15 00:26:25 +00:00
Chris Young
bdf75f07aa Try harder to get useful values if (a) getent is not available or (b) HOSTNAME env-var
does not exist.

svn path=/trunk/netsurf/; revision=12055
2011-03-15 00:20:18 +00:00
John Mark Bell
408f78b737 Move schedule.h to utils/
svn path=/trunk/netsurf/; revision=12039
2011-03-13 22:50:54 +00:00
Chris Young
c615507e15 Set version using testament.h instead of old ARexx script
svn path=/trunk/netsurf/; revision=12028
2011-03-13 17:32:00 +00:00
Daniel Silverstone
514b94b1f4 Add hostname and path
svn path=/trunk/netsurf/; revision=12023
2011-03-13 12:17:18 +00:00
Daniel Silverstone
8695000b83 Slightly better out-of-svn build info
svn path=/trunk/netsurf/; revision=12022
2011-03-13 12:09:01 +00:00
Daniel Silverstone
cc18b5f21e Initial testament functionality
svn path=/trunk/netsurf/; revision=12020
2011-03-13 11:59:20 +00:00
John Mark Bell
0c7c722e23 Log to stderr
svn path=/trunk/netsurf/; revision=11983
2011-03-12 19:13:27 +00:00
Daniel Silverstone
7e85d15cb6 Add a deaf monkey frontend. TODO: Make it listen
svn path=/trunk/netsurf/; revision=11968
2011-03-12 15:08:07 +00:00
John Mark Bell
f71dcf9667 Further hackery for the inconsistency of iconv() APIs
svn path=/trunk/netsurf/; revision=11951
2011-03-09 21:30:54 +00:00
John Mark Bell
021d3afd3e Fix comment
svn path=/trunk/netsurf/; revision=11798
2011-02-25 19:41:13 +00:00
Vincent Sanders
0231675abf add resource handling
move gtk and framebuffer to use generic resource handling

svn path=/trunk/netsurf/; revision=11772
2011-02-23 22:27:55 +00:00
John Mark Bell
c550ae0e69 Parser for Content-Disposition header
svn path=/trunk/netsurf/; revision=11765
2011-02-22 23:46:03 +00:00
Vincent Sanders
3c414e7668 Stop win32 frontend using 100% cpu time when idle
svn path=/trunk/netsurf/; revision=11633
2011-02-08 23:42:18 +00:00
Vincent Sanders
aa2865c7a4 add compatability for inet_pton and inet_aton
svn path=/trunk/netsurf/; revision=11627
2011-02-07 14:41:44 +00:00
John Mark Bell
a128b7acec Rationalise definition of NO_IPV6 for atari frontend
svn path=/trunk/netsurf/; revision=11623
2011-02-06 15:40:36 +00:00
John Mark Bell
656a2d20c1 Explicitly cast unused results to void
svn path=/trunk/netsurf/; revision=11596
2011-02-01 21:50:34 +00:00
Sven Weidauer
fd23621211 Changing Xcode project file to build using the Makefiles and fixed some warnings.
svn path=/trunk/netsurf/; revision=11558
2011-01-31 07:57:52 +00:00
François Revel
3060423700 Remove odd WARNFLAGS copied from Atari stuff. Silence warning about redeclared strcasestr().
svn path=/trunk/netsurf/; revision=11381
2011-01-19 01:42:54 +00:00
John Mark Bell
e65bdafbe3 Fix url_host_is_ip_address() when encountering blatently invalid IPv4 addresses (which inet_aton fails to notice).
Also fix a number of insidious buffer overflows.

svn path=/trunk/netsurf/; revision=11293
2011-01-12 21:48:07 +00:00
John Mark Bell
8c09af5568 Add Mac OS X detection to config.h (credit: Sven Weidauer)
svn path=/trunk/netsurf/; revision=11291
2011-01-12 20:15:04 +00:00
James Bursa
ae44623e0d Remove unused include.
svn path=/trunk/netsurf/; revision=11273
2011-01-09 21:39:49 +00:00
John Mark Bell
124e4cd788 Atari frontend (credit: Ole Loots)
svn path=/trunk/netsurf/; revision=11218
2011-01-05 21:02:22 +00:00