summaryrefslogtreecommitdiff
path: root/utils/url.c
Commit message (Collapse)AuthorAgeFilesLines
* url: Use ascii module, rather than ctype for locale safetly.Michael Drake2016-08-131-1/+3
|
* Improve percent escaping testing, parameter checking and documentationVincent Sanders2016-08-031-4/+17
|
* URL escape: Simplify to avoid unnecessary allocation.Michael Drake2016-07-251-34/+31
| | | | | | | | This removes the toskip parameter, which was only used by the RISC OS front end. The toskip param was used to skip 8 characters which did not need to be escaped from the start of the URL. The RISC OS front end now orders the steps of its URL construction to avoid the need for this.
* Improve comments.Michael Drake2016-07-241-1/+1
|
* URL module: Remove unused curl #include.Michael Drake2016-07-241-1/+0
|
* URL unescape: Calculate new_len at end, rather than maintaining it.Michael Drake2016-07-241-4/+2
|
* URL unescape: return the new length to the caller.Michael Drake2016-07-241-1/+5
| | | | | | | | The avoids situations were we threw away the length, only for the caller to have to strlen the returned string. Note, there seems to be a case of the amiga front end writing beyond end of allocation. Added a TODO for now.
* Avoid using curl for URL unescaping.Michael Drake2016-07-241-10/+66
| | | | This moves us towards working without curl.
* URL unescape: Use size_t for length.Michael Drake2016-07-241-1/+1
|
* reduce curl usage to fetcher, url unescaping and time parsingVincent Sanders2016-06-291-2/+2
|
* Split utils header into string functions and everything elseVincent Sanders2016-04-211-1/+1
| | | | | split out the string handling API from the rest of the utils header and fix up all the fallout.
* Move host_is_ip_address into urldb, as that's the only thing that cares.Michael Drake2014-10-311-85/+0
|
* remove unused url_init functionVincent Sanders2014-10-311-29/+0
|
* use nsurl_nice and remove url_niceVincent Sanders2014-10-311-103/+0
| | | | | change all callers over to using new API for generating nice filenames from a url and remove the old API.
* Remove unused url_components stuff.Michael Drake2014-10-261-141/+0
|
* Remove unused url_path function.Michael Drake2014-10-261-23/+0
|
* Remove unused url_scheme function.Michael Drake2014-10-261-23/+0
|
* make regex wrapper return errors instead of just abortingVincent Sanders2014-10-251-3/+9
|
* remove unused url operationsVincent Sanders2014-05-091-354/+0
|
* refactor url utility functions to use standard nserror codes and have ↵Vincent Sanders2014-05-081-133/+66
| | | | appropriate documentation.
* remove uncessary includesVincent Sanders2014-05-021-7/+2
|
* Make url_{get|reform|destroy}_components static.Michael Drake2012-10-111-191/+191
|
* Remove unused function.Michael Drake2012-10-111-34/+0
|
* Don't need url_compare any more.Michael Drake2012-10-111-69/+0
|
* Remove url_parent.Michael Drake2012-10-061-49/+0
|
* Remove unused functions.Michael Drake2012-10-051-110/+0
|
* Remove unused url_normalise() and don't include regex.h.Michael Drake2011-10-061-198/+1
| | | | svn path=/trunk/netsurf/; revision=12971
* Skip over credentials when lower casing hostJohn Mark Bell2011-07-241-1/+13
| | | | svn path=/trunk/netsurf/; revision=12624
* Fix commentJohn Mark Bell2011-02-251-1/+1
| | | | svn path=/trunk/netsurf/; revision=11798
* add compatability for inet_pton and inet_atonVincent Sanders2011-02-071-2/+1
| | | | svn path=/trunk/netsurf/; revision=11627
* Fix url_host_is_ip_address() when encountering blatently invalid IPv4 ↵John Mark Bell2011-01-121-10/+27
| | | | | | | | addresses (which inet_aton fails to notice). Also fix a number of insidious buffer overflows. svn path=/trunk/netsurf/; revision=11293
* Fix OpenBSD build (credit: Anthony Bentley)John Mark Bell2010-12-141-0/+1
| | | | svn path=/trunk/netsurf/; revision=11054
* BeOS does not support IPv6, and never will.François Revel2010-12-051-0/+1
| | | | svn path=/trunk/netsurf/; revision=11014
* More IPv6 compatibility work, added hack to cope with incorrect calls to ↵Rob Kendrick2010-12-041-7/+59
| | | | | | url_host_is_ip_address while we fix the callers. svn path=/trunk/netsurf/; revision=10968
* Reimplement url_host_is_ipaddress() to cope with IPv6 addresses and ↵Rob Kendrick2010-12-041-17/+20
| | | | | | decimal/hex IPv4 addresses in addition to dotted-quad v4 addresses. svn path=/trunk/netsurf/; revision=10959
* Improve url_host_is_ip_address Vincent Sanders2010-11-261-29/+19
| | | | svn path=/trunk/netsurf/; revision=10951
* Merge branches/vince/netsurf-file-fetcher to trunkJohn Mark Bell2010-09-091-0/+25
| | | | | | r=jmb svn path=/trunk/netsurf/; revision=10750
* remove _GNU_SOURCE define from everywhere.Vincent Sanders2010-04-241-1/+0
| | | | | | strndup is not standard so provide an implementation. svn path=/trunk/netsurf/; revision=10474
* We don't care about the result of regexec(); only that it was successful or notJohn Mark Bell2009-05-281-3/+2
| | | | svn path=/trunk/netsurf/; revision=7612
* Add _GNU_SOURCE. Ugh.John Mark Bell2008-11-281-0/+1
| | | | svn path=/trunk/netsurf/; revision=5813
* More hoops, more warnings squashed.John Mark Bell2008-10-131-10/+9
| | | | svn path=/trunk/netsurf/; revision=5570
* Merged revisions 5309-5406,5409-5422 via svnmerge from Daniel Silverstone2008-09-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* warnings.squash();John Mark Bell2008-05-261-4/+5
| | | | svn path=/trunk/netsurf/; revision=4206
* - introduction of SLEN()John Tytgat2008-05-251-5/+11
| | | | | | | - enforce result of url_normalize() being NULL on failure - plug memory leak when url_normalize() fails svn path=/trunk/netsurf/; revision=4200
* Contribution from Philip Boulain <prb@ecs.soton.ac.uk>:John Tytgat2008-05-251-44/+73
| | | | | | | | | | | | | | | | | | | | | 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
* - riscos/gui.c(path_to_url): escape the characters which need to be escaped ↵John Tytgat2008-04-021-17/+24
| | | | | | | | | | | | | | 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
* Remove spurious *John Mark Bell2008-03-131-1/+3
| | | | svn path=/trunk/netsurf/; revision=3946
* Add url_fragment to extract fragment from URLJohn Mark Bell2008-02-031-6/+47
| | | | | | | | 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
* The previous fix was broken -- URI paths include the leafname.John Mark Bell2008-01-071-9/+2
| | | | | | | | | 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
* Add url_leafname()John Mark Bell2008-01-071-1/+33
| | | | | | Remove spurious * from url_host_is_ip_address() svn path=/trunk/netsurf/; revision=3691