Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/7338f3ce8846fb6a78e86...
...commit
http://git.netsurf-browser.org/netsurf.git/commit/7338f3ce8846fb6a78e8691...
...tree
http://git.netsurf-browser.org/netsurf.git/tree/7338f3ce8846fb6a78e8691e7...
The branch, master has been updated
via 7338f3ce8846fb6a78e8691e79a8c83474a6ac9a (commit)
from f90559d2db0132e877adff474895600d9c8fe65f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=7338f3ce8846fb6a78e...
commit 7338f3ce8846fb6a78e8691e79a8c83474a6ac9a
Author: Michael Drake <michael.drake(a)codethink.co.uk>
Commit: Michael Drake <michael.drake(a)codethink.co.uk>
nsurl: Remove redundant code path.
diff --git a/utils/nsurl/parse.c b/utils/nsurl/parse.c
index 7e78732..7474a61 100644
--- a/utils/nsurl/parse.c
+++ b/utils/nsurl/parse.c
@@ -1430,14 +1430,15 @@ nserror nsurl_join(const nsurl *base, const char *rel, nsurl
**joined)
struct url_markers m_path;
size_t new_length;
- if (base->components.host != NULL &&
- base->components.path == NULL) {
- /* Append relative path to "/". */
- *(buff_pos++) = '/';
- memcpy(buff_pos, rel + m.path, m.query - m.path);
- buff_pos += m.query - m.path;
-
- } else {
+ /* RFC3986 said to append relative path to "/" if the
+ * base path had no path and an authority.
+ *
+ * However, that specification is redundant, and base paths
+ * are normalised, so file, http, and https URLs will always
+ * have a non-empty path. (Empty paths become "/".)
+ */
+
+ {
/* Append relative path to all but last segment of
* base path. */
size_t path_end = lwc_string_length(
-----------------------------------------------------------------------
Summary of changes:
utils/nsurl/parse.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/utils/nsurl/parse.c b/utils/nsurl/parse.c
index 7e78732..7474a61 100644
--- a/utils/nsurl/parse.c
+++ b/utils/nsurl/parse.c
@@ -1430,14 +1430,15 @@ nserror nsurl_join(const nsurl *base, const char *rel, nsurl
**joined)
struct url_markers m_path;
size_t new_length;
- if (base->components.host != NULL &&
- base->components.path == NULL) {
- /* Append relative path to "/". */
- *(buff_pos++) = '/';
- memcpy(buff_pos, rel + m.path, m.query - m.path);
- buff_pos += m.query - m.path;
-
- } else {
+ /* RFC3986 said to append relative path to "/" if the
+ * base path had no path and an authority.
+ *
+ * However, that specification is redundant, and base paths
+ * are normalised, so file, http, and https URLs will always
+ * have a non-empty path. (Empty paths become "/".)
+ */
+
+ {
/* Append relative path to all but last segment of
* base path. */
size_t path_end = lwc_string_length(
--
NetSurf Browser