Commit Graph

78 Commits

Author SHA1 Message Date
Michael Drake
64d591676b Remove unused url_components stuff. 2014-10-26 10:23:28 +00:00
Michael Drake
1ccfcfe953 Remove unused url_path function. 2014-10-26 10:21:27 +00:00
Michael Drake
d732b0c769 Remove unused url_scheme function. 2014-10-26 10:18:39 +00:00
Vincent Sanders
e39606c411 make regex wrapper return errors instead of just aborting 2014-10-25 23:07:00 +01:00
Vincent Sanders
429d6e20f7 remove unused url operations 2014-05-09 10:30:24 +01:00
Vincent Sanders
096bd47ab0 refactor url utility functions to use standard nserror codes and have appropriate documentation. 2014-05-08 00:16:50 +01:00
Vincent Sanders
0c5c7159d8 remove uncessary includes 2014-05-02 12:26:25 +01:00
Michael Drake
672fa0a8e2 Make url_{get|reform|destroy}_components static. 2012-10-11 20:12:06 +01:00
Michael Drake
4c4e93ea54 Remove unused function. 2012-10-11 17:49:01 +01:00
Michael Drake
8ab9430bb4 Don't need url_compare any more. 2012-10-11 17:24:00 +01:00
Michael Drake
aeac82ff17 Remove url_parent. 2012-10-06 14:11:29 +01:00
Michael Drake
01f421611c Remove unused functions. 2012-10-05 17:29:19 +01: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
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
021d3afd3e Fix comment
svn path=/trunk/netsurf/; revision=11798
2011-02-25 19:41:13 +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
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
b550f27f4b Fix OpenBSD build (credit: Anthony Bentley)
svn path=/trunk/netsurf/; revision=11054
2010-12-14 08:38:20 +00:00
François Revel
afc6a62b7a BeOS does not support IPv6, and never will.
svn path=/trunk/netsurf/; revision=11014
2010-12-05 19:16:49 +00:00
Rob Kendrick
632f7df653 More IPv6 compatibility work, added hack to cope with incorrect calls to url_host_is_ip_address while we fix the callers.
svn path=/trunk/netsurf/; revision=10968
2010-12-04 16:35:48 +00:00
Rob Kendrick
fe56f45ac6 Reimplement url_host_is_ipaddress() to cope with IPv6 addresses and decimal/hex IPv4 addresses in addition to dotted-quad v4 addresses.
svn path=/trunk/netsurf/; revision=10959
2010-12-04 14:47:03 +00:00
Vincent Sanders
18196e6692 Improve url_host_is_ip_address
svn path=/trunk/netsurf/; revision=10951
2010-11-26 15:36:27 +00:00
John Mark Bell
2077918805 Merge branches/vince/netsurf-file-fetcher to trunk
r=jmb

svn path=/trunk/netsurf/; revision=10750
2010-09-09 21:45:59 +00:00
Vincent Sanders
03bb3e8636 remove _GNU_SOURCE define from everywhere.
strndup is not standard so provide an implementation.

svn path=/trunk/netsurf/; revision=10474
2010-04-24 15:22:17 +00:00
John Mark Bell
6471f83c19 We don't care about the result of regexec(); only that it was successful or not
svn path=/trunk/netsurf/; revision=7612
2009-05-28 16:25:01 +00:00
John Mark Bell
ce93fc9d4c Add _GNU_SOURCE. Ugh.
svn path=/trunk/netsurf/; revision=5813
2008-11-28 17:20:50 +00:00
John Mark Bell
bd94520701 More hoops, more warnings squashed.
svn path=/trunk/netsurf/; revision=5570
2008-10-13 23:49:15 +00:00
Daniel Silverstone
3f5d902edd Merged revisions 5309-5406,5409-5422 via svnmerge from
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
2008-09-23 14:00:40 +00:00
John Mark Bell
50f520379b warnings.squash();
svn path=/trunk/netsurf/; revision=4206
2008-05-26 10:34:47 +00:00
John Tytgat
793d466edf - introduction of SLEN()
- enforce result of url_normalize() being NULL on failure
- plug memory leak when url_normalize() fails

svn path=/trunk/netsurf/; revision=4200
2008-05-25 15:51:30 +00:00
John Tytgat
3f6d2a9f0c Contribution from Philip Boulain <prb@ecs.soton.ac.uk>:
This makes url_normalize take care of whitespace in a fairly useful way,
consistent with other browsers:

 - Leading and trailing whitespace is trimmed
 - Internal whitespace is urlescaped

For example,
 "  http://www.google.co.uk/search?q=hello world  "
becomes
 "http://www.google.co.uk/search?q=hello%20world"

Explicit trailing whitespace, e.g. "...hello world%20", is left alone.

The upshot is that if you sloppily copy-paste a URL from IRC or whatnot
into the address bar, NetSurf no longer silently ignores you if you
caught some adjacent whitespace.

svn path=/trunk/netsurf/; revision=4198
2008-05-25 15:04:22 +00:00
John Tytgat
0d39c69763 - riscos/gui.c(path_to_url): escape the characters which need to be escaped when converting the host path to file: URL.
- utils/{url.c,url.h}(url_escape):
  * added parameter 'toskip' to specify number of input characters which need to be skipped in the escape process. This avoids extra malloc buffer juggling.
  * added parameter 'escexceptions' to specify the characters which need to be excluded from the escape process.

Solves SF tracker ID 1910169.
Note that when discname in path contains '/' characters (case: "file:///Sunfish#192.168.0.50::/home/joty.$/jo.html") or there is no discname specified at all (case "file:///HostFS:$/jo.htm"), you 
need an UnixLib fix as in http://www.riscos.info/websvn/listing.php?repname=gccsdk&path=%2Ftrunk%2Fgcc4%2F&rev=3395&sc=1

svn path=/trunk/netsurf/; revision=4069
2008-04-02 00:43:51 +00:00
John Mark Bell
b087dfb3da Remove spurious *
svn path=/trunk/netsurf/; revision=3946
2008-03-13 18:26:20 +00:00
John Mark Bell
ad6fcea6b0 Add url_fragment to extract fragment from URL
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
2008-02-03 12:04:48 +00:00
John Mark Bell
2fa8e656a1 The previous fix was broken -- URI paths include the leafname.
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
2008-01-07 12:01:11 +00:00
John Mark Bell
252ad5c476 Add url_leafname()
Remove spurious * from url_host_is_ip_address()

svn path=/trunk/netsurf/; revision=3691
2008-01-07 04:54:08 +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
d1b79f3e41 Bring percent-encoding closer to what other browsers do.
svn path=/trunk/netsurf/; revision=3179
2007-02-11 22:28:00 +00:00
Richard Wilson
ef65cb38bd Fix 1535120, 1528673
svn path=/trunk/netsurf/; revision=3087
2006-12-01 21:09:49 +00:00
Michael Drake
ba23e4b693 Update project URL.
svn path=/trunk/netsurf/; revision=3073
2006-11-27 15:35:18 +00:00
John Mark Bell
4b09b7b8a0 Correcly encode spaces for url-encoded form submission.
svn path=/trunk/netsurf/; revision=2960
2006-09-19 10:08:33 +00:00
Richard Wilson
b0851c9dde Expose url component functions.
svn path=/trunk/netsurf/; revision=2907
2006-09-02 16:42:37 +00:00
Richard Wilson
6c4003bf90 Remove URL caching and fix NULL reads.
svn path=/trunk/netsurf/; revision=2855
2006-08-17 14:48:28 +00:00
Richard Wilson
de0c4e2c32 Implement up toolbar icon and menu option.
svn path=/trunk/netsurf/; revision=2705
2006-07-03 21:07:02 +00:00
John Mark Bell
b7af14b591 Implement component-wise URL comparison
svn path=/trunk/netsurf/; revision=2697
2006-07-02 22:34:04 +00:00
John Mark Bell
f73bae5c29 Make url_plq ensure url_get_components found a path
Make url_scheme call url_destroy_components in case where no scheme was 
found.

svn path=/trunk/netsurf/; revision=2686
2006-07-01 22:40:41 +00:00
Richard Wilson
f22838ab62 Stop possible pollution of the cache.
svn path=/trunk/netsurf/; revision=2681
2006-06-30 23:09:21 +00:00
Richard Wilson
cea180d752 Rewrite url_join to RFC 3986 compliance, and without the use of regular expressions. This should speed up pages with lots of links and also fix certain cases where URLs were incorrectly returned.
svn path=/trunk/netsurf/; revision=2664
2006-06-28 21:49:41 +00:00
Richard Wilson
d45a56ba7f Fix URL joining for fragments.
svn path=/trunk/netsurf/; revision=2658
2006-06-27 18:47:33 +00:00