summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhsoting.net>2018-03-21 22:11:05 +0100
committerJörg Frings-Fürst <debian@jff-webhsoting.net>2018-03-21 22:11:05 +0100
commit6d05f3e01a26fa416c9d0150163db20abac4b4ef (patch)
treeb568a83a8759142bd580ee5bd59497092dc9c6f4 /src
parentbb0fbadacbd603b1e8d258f75ff5ca8ee481feb4 (diff)
New upstream version 0.8.5upstream/0.8.5
Diffstat (limited to 'src')
-rw-r--r--src/UriCommon.c2
-rw-r--r--src/UriCommon.h2
-rw-r--r--src/UriCompare.c2
-rw-r--r--src/UriEscape.c2
-rw-r--r--src/UriFile.c4
-rw-r--r--src/UriIp4.c2
-rw-r--r--src/UriIp4Base.c2
-rw-r--r--src/UriIp4Base.h2
-rw-r--r--src/UriNormalize.c4
-rw-r--r--src/UriNormalizeBase.c2
-rw-r--r--src/UriNormalizeBase.h2
-rw-r--r--src/UriParse.c10
-rw-r--r--src/UriParseBase.c2
-rw-r--r--src/UriParseBase.h2
-rw-r--r--src/UriQuery.c2
-rw-r--r--src/UriRecompose.c2
-rw-r--r--src/UriResolve.c6
-rw-r--r--src/UriShorten.c4
18 files changed, 28 insertions, 26 deletions
diff --git a/src/UriCommon.c b/src/UriCommon.c
index 37d6b39..571d6d4 100644
--- a/src/UriCommon.c
+++ b/src/UriCommon.c
@@ -2,7 +2,7 @@
* uriparser - RFC 3986 URI parsing library
*
* Copyright (C) 2007, Weijia Song <songweijia@gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/UriCommon.h b/src/UriCommon.h
index f6bc2cc..b062fcc 100644
--- a/src/UriCommon.h
+++ b/src/UriCommon.h
@@ -2,7 +2,7 @@
* uriparser - RFC 3986 URI parsing library
*
* Copyright (C) 2007, Weijia Song <songweijia@gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/UriCompare.c b/src/UriCompare.c
index 6896f64..35f5a13 100644
--- a/src/UriCompare.c
+++ b/src/UriCompare.c
@@ -2,7 +2,7 @@
* uriparser - RFC 3986 URI parsing library
*
* Copyright (C) 2007, Weijia Song <songweijia@gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/UriEscape.c b/src/UriEscape.c
index 79ee3a6..17f8bad 100644
--- a/src/UriEscape.c
+++ b/src/UriEscape.c
@@ -2,7 +2,7 @@
* uriparser - RFC 3986 URI parsing library
*
* Copyright (C) 2007, Weijia Song <songweijia@gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/UriFile.c b/src/UriFile.c
index 9cf788f..332f6a9 100644
--- a/src/UriFile.c
+++ b/src/UriFile.c
@@ -2,7 +2,7 @@
* uriparser - RFC 3986 URI parsing library
*
* Copyright (C) 2007, Weijia Song <songweijia@gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -83,7 +83,7 @@ static URI_INLINE int URI_FUNC(FilenameToUriString)(const URI_CHAR * filename,
is_windows_network = (filename[0] == _UT('\\')) && (filename[1] == _UT('\\'));
absolute = fromUnix
? (filename[0] == _UT('/'))
- : ((filename[0] != _UT('\0')) && (filename[1] == _UT(':'))
+ : (((filename[0] != _UT('\0')) && (filename[1] == _UT(':')))
|| is_windows_network);
if (absolute) {
diff --git a/src/UriIp4.c b/src/UriIp4.c
index c00910b..ee067d3 100644
--- a/src/UriIp4.c
+++ b/src/UriIp4.c
@@ -2,7 +2,7 @@
* uriparser - RFC 3986 URI parsing library
*
* Copyright (C) 2007, Weijia Song <songweijia@gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/UriIp4Base.c b/src/UriIp4Base.c
index 5cd298f..f066246 100644
--- a/src/UriIp4Base.c
+++ b/src/UriIp4Base.c
@@ -2,7 +2,7 @@
* uriparser - RFC 3986 URI parsing library
*
* Copyright (C) 2007, Weijia Song <songweijia@gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/UriIp4Base.h b/src/UriIp4Base.h
index 23b838e..bef028f 100644
--- a/src/UriIp4Base.h
+++ b/src/UriIp4Base.h
@@ -2,7 +2,7 @@
* uriparser - RFC 3986 URI parsing library
*
* Copyright (C) 2007, Weijia Song <songweijia@gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/UriNormalize.c b/src/UriNormalize.c
index 49db9ff..d68c371 100644
--- a/src/UriNormalize.c
+++ b/src/UriNormalize.c
@@ -2,7 +2,7 @@
* uriparser - RFC 3986 URI parsing library
*
* Copyright (C) 2007, Weijia Song <songweijia@gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -434,8 +434,8 @@ static URI_INLINE UriBool URI_FUNC(MakeOwner)(URI_TYPE(Uri) * uri,
&& (ranger->text.afterLast != NULL)
&& (ranger->text.afterLast > ranger->text.first)) {
free((URI_CHAR *)ranger->text.first);
- free(ranger);
}
+ free(ranger);
ranger = next;
}
diff --git a/src/UriNormalizeBase.c b/src/UriNormalizeBase.c
index bac5888..8dbe7fd 100644
--- a/src/UriNormalizeBase.c
+++ b/src/UriNormalizeBase.c
@@ -2,7 +2,7 @@
* uriparser - RFC 3986 URI parsing library
*
* Copyright (C) 2007, Weijia Song <songweijia@gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/UriNormalizeBase.h b/src/UriNormalizeBase.h
index 9f3abd5..c9de968 100644
--- a/src/UriNormalizeBase.h
+++ b/src/UriNormalizeBase.h
@@ -2,7 +2,7 @@
* uriparser - RFC 3986 URI parsing library
*
* Copyright (C) 2007, Weijia Song <songweijia@gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/UriParse.c b/src/UriParse.c
index e3cdc68..5eee16d 100644
--- a/src/UriParse.c
+++ b/src/UriParse.c
@@ -2,7 +2,7 @@
* uriparser - RFC 3986 URI parsing library
*
* Copyright (C) 2007, Weijia Song <songweijia@gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -193,7 +193,7 @@ static UriBool URI_FUNC(OnExitOwnPortUserInfo)(URI_TYPE(ParserState) * state, co
static UriBool URI_FUNC(OnExitSegmentNzNcOrScheme2)(URI_TYPE(ParserState) * state, const URI_CHAR * first);
static void URI_FUNC(OnExitPartHelperTwo)(URI_TYPE(ParserState) * state);
-static void URI_FUNC(ResetParserState)(URI_TYPE(ParserState) * state);
+static void URI_FUNC(ResetParserStateExceptUri)(URI_TYPE(ParserState) * state);
static UriBool URI_FUNC(PushPathSegment)(URI_TYPE(ParserState) * state, const URI_CHAR * first, const URI_CHAR * afterLast);
@@ -2022,7 +2022,7 @@ static const URI_CHAR * URI_FUNC(ParseZeroMoreSlashSegs)(URI_TYPE(ParserState) *
-static URI_INLINE void URI_FUNC(ResetParserState)(URI_TYPE(ParserState) * state) {
+static URI_INLINE void URI_FUNC(ResetParserStateExceptUri)(URI_TYPE(ParserState) * state) {
URI_TYPE(Uri) * const uriBackup = state->uri;
memset(state, 0, sizeof(URI_TYPE(ParserState)));
state->uri = uriBackup;
@@ -2071,7 +2071,7 @@ int URI_FUNC(ParseUriEx)(URI_TYPE(ParserState) * state, const URI_CHAR * first,
uri = state->uri;
/* Init parser */
- URI_FUNC(ResetParserState)(state);
+ URI_FUNC(ResetParserStateExceptUri)(state);
URI_FUNC(ResetUri)(uri);
/* Parse */
@@ -2211,9 +2211,9 @@ UriBool URI_FUNC(_TESTING_ONLY_ParseIpSix)(const URI_CHAR * text) {
const URI_CHAR * const afterIpSix = text + URI_STRLEN(text);
const URI_CHAR * res;
- URI_FUNC(ResetParserState)(&parser);
URI_FUNC(ResetUri)(&uri);
parser.uri = &uri;
+ URI_FUNC(ResetParserStateExceptUri)(&parser);
parser.uri->hostData.ip6 = malloc(1 * sizeof(UriIp6));
res = URI_FUNC(ParseIPv6address2)(&parser, text, afterIpSix);
URI_FUNC(FreeUriMembers)(&uri);
diff --git a/src/UriParseBase.c b/src/UriParseBase.c
index 75e4761..1d4ef6e 100644
--- a/src/UriParseBase.c
+++ b/src/UriParseBase.c
@@ -2,7 +2,7 @@
* uriparser - RFC 3986 URI parsing library
*
* Copyright (C) 2007, Weijia Song <songweijia@gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/UriParseBase.h b/src/UriParseBase.h
index dea5c81..384946b 100644
--- a/src/UriParseBase.h
+++ b/src/UriParseBase.h
@@ -2,7 +2,7 @@
* uriparser - RFC 3986 URI parsing library
*
* Copyright (C) 2007, Weijia Song <songweijia@gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/UriQuery.c b/src/UriQuery.c
index 7adb073..f0cd4f8 100644
--- a/src/UriQuery.c
+++ b/src/UriQuery.c
@@ -2,7 +2,7 @@
* uriparser - RFC 3986 URI parsing library
*
* Copyright (C) 2007, Weijia Song <songweijia@gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/UriRecompose.c b/src/UriRecompose.c
index 09daee0..9678aac 100644
--- a/src/UriRecompose.c
+++ b/src/UriRecompose.c
@@ -2,7 +2,7 @@
* uriparser - RFC 3986 URI parsing library
*
* Copyright (C) 2007, Weijia Song <songweijia@gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/UriResolve.c b/src/UriResolve.c
index 3660b6b..bb1d21a 100644
--- a/src/UriResolve.c
+++ b/src/UriResolve.c
@@ -2,7 +2,7 @@
* uriparser - RFC 3986 URI parsing library
*
* Copyright (C) 2007, Weijia Song <songweijia@gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -152,6 +152,8 @@ static int URI_FUNC(AddBaseUriImpl)(URI_TYPE(Uri) * absDest,
const URI_TYPE(Uri) * relSource,
const URI_TYPE(Uri) * absBase,
UriResolutionOptions options) {
+ UriBool relSourceHasScheme;
+
if (absDest == NULL) {
return URI_ERROR_NULL;
}
@@ -169,7 +171,7 @@ static int URI_FUNC(AddBaseUriImpl)(URI_TYPE(Uri) * absDest,
/* [00/32] -- A non-strict parser may ignore a scheme in the reference */
/* [00/32] -- if it is identical to the base URI's scheme. */
/* [00/32] if ((not strict) and (R.scheme == Base.scheme)) then */
- UriBool relSourceHasScheme = (relSource->scheme.first != NULL) ? URI_TRUE : URI_FALSE;
+ relSourceHasScheme = (relSource->scheme.first != NULL) ? URI_TRUE : URI_FALSE;
if ((options & URI_RESOLVE_IDENTICAL_SCHEME_COMPAT)
&& (absBase->scheme.first != NULL)
&& (relSource->scheme.first != NULL)
diff --git a/src/UriShorten.c b/src/UriShorten.c
index c839ae5..0145f68 100644
--- a/src/UriShorten.c
+++ b/src/UriShorten.c
@@ -2,7 +2,7 @@
* uriparser - RFC 3986 URI parsing library
*
* Copyright (C) 2007, Weijia Song <songweijia@gmail.com>
- * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org>
+ * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -131,7 +131,7 @@ static URI_INLINE UriBool URI_FUNC(EqualsAuthority)(const URI_TYPE(Uri) * first,
-int URI_FUNC(RemoveBaseUriImpl)(URI_TYPE(Uri) * dest,
+static int URI_FUNC(RemoveBaseUriImpl)(URI_TYPE(Uri) * dest,
const URI_TYPE(Uri) * absSource,
const URI_TYPE(Uri) * absBase,
UriBool domainRootMode) {