Commit graph

14 commits

Author SHA1 Message Date
Linus Groh c8d0a2eb3c AK: Parse query and fragment in URL::parse() 2020-04-12 01:18:39 +02:00
Linus Groh 21a61b276b AK: Support fragment in URL 2020-04-12 01:18:39 +02:00
Andreas Kling b1555381ee AK: Recompute URL validity after changing protocol/host/path
This allows you to build URLs by calling setters on an empty URL and
actually get a valid URL at the end.
2020-04-11 23:11:10 +02:00
Andreas Kling ceec1a7d38 AK: Make Vector use size_t for its size and capacity 2020-02-25 14:52:35 +01:00
Andreas Kling 94ca55cefd Meta: Add license header to source files
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.

For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.

Going forward, all new source files should include a license header.
2020-01-18 09:45:54 +01:00
Andreas Kling 9641f74310 AK: Teach URL::complete_url() how to resolve URL's starting with "/" 2019-12-10 21:13:00 +01:00
Andreas Kling 6f4c380d95 AK: Use size_t for the length of strings
Using int was a mistake. This patch changes String, StringImpl,
StringView and StringBuilder to use size_t instead of int for lengths.
Obviously a lot of code needs to change as a result of this.
2019-12-09 17:51:21 +01:00
Andreas Kling a91c17c0eb AK: Add a query string component to URL
It's missing query string parsing from new URLs, but you can set the
query string programmatically, and it will be part of the URL when
serialized through to_string().
2019-11-25 21:21:27 +01:00
Andreas Kling 0405ab91aa LibHTML+AK: Move URL completion from Document to AK::URL
Completing a relative URL based on a base URL seems like generally
useful functionality.
2019-11-19 17:46:36 +01:00
Andreas Kling 835496375f URL: https:// URLs should default to port 443 2019-10-21 17:19:17 +02:00
Andreas Kling f1f928670e URL: Parse URLs that lack a path (e.g "http://serenityos.org") 2019-10-17 23:39:31 +02:00
Andreas Kling bf5a65d934 URL: No need to include ":80" when serializing http:// URLs 2019-10-10 22:06:25 +02:00
Andreas Kling d64c054d25 AK: URL should support file:// URL's
Also add some setters since this class was very setter-less.
2019-10-05 10:14:42 +02:00
Andreas Kling ed43770b2f AK: Add a basic URL class to help us handle URL's
We're gonna need these as we start to write more networking programs.
2019-08-10 17:30:35 +02:00