summaryrefslogtreecommitdiffstats
path: root/plugins/uriparser/UriParse.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uriparser/UriParse.c')
-rw-r--r--plugins/uriparser/UriParse.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/uriparser/UriParse.c b/plugins/uriparser/UriParse.c
index e3cdc68..5eee16d 100644
--- a/plugins/uriparser/UriParse.c
+++ b/plugins/uriparser/UriParse.c
@@ -2,7 +2,7 @@
2 * uriparser - RFC 3986 URI parsing library 2 * uriparser - RFC 3986 URI parsing library
3 * 3 *
4 * Copyright (C) 2007, Weijia Song <songweijia@gmail.com> 4 * Copyright (C) 2007, Weijia Song <songweijia@gmail.com>
5 * Copyright (C) 2007, Sebastian Pipping <webmaster@hartwork.org> 5 * Copyright (C) 2007, Sebastian Pipping <sebastian@pipping.org>
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * 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
193static UriBool URI_FUNC(OnExitSegmentNzNcOrScheme2)(URI_TYPE(ParserState) * state, const URI_CHAR * first); 193static UriBool URI_FUNC(OnExitSegmentNzNcOrScheme2)(URI_TYPE(ParserState) * state, const URI_CHAR * first);
194static void URI_FUNC(OnExitPartHelperTwo)(URI_TYPE(ParserState) * state); 194static void URI_FUNC(OnExitPartHelperTwo)(URI_TYPE(ParserState) * state);
195 195
196static void URI_FUNC(ResetParserState)(URI_TYPE(ParserState) * state); 196static void URI_FUNC(ResetParserStateExceptUri)(URI_TYPE(ParserState) * state);
197 197
198static UriBool URI_FUNC(PushPathSegment)(URI_TYPE(ParserState) * state, const URI_CHAR * first, const URI_CHAR * afterLast); 198static UriBool URI_FUNC(PushPathSegment)(URI_TYPE(ParserState) * state, const URI_CHAR * first, const URI_CHAR * afterLast);
199 199
@@ -2022,7 +2022,7 @@ static const URI_CHAR * URI_FUNC(ParseZeroMoreSlashSegs)(URI_TYPE(ParserState) *
2022 2022
2023 2023
2024 2024
2025static URI_INLINE void URI_FUNC(ResetParserState)(URI_TYPE(ParserState) * state) { 2025static URI_INLINE void URI_FUNC(ResetParserStateExceptUri)(URI_TYPE(ParserState) * state) {
2026 URI_TYPE(Uri) * const uriBackup = state->uri; 2026 URI_TYPE(Uri) * const uriBackup = state->uri;
2027 memset(state, 0, sizeof(URI_TYPE(ParserState))); 2027 memset(state, 0, sizeof(URI_TYPE(ParserState)));
2028 state->uri = uriBackup; 2028 state->uri = uriBackup;
@@ -2071,7 +2071,7 @@ int URI_FUNC(ParseUriEx)(URI_TYPE(ParserState) * state, const URI_CHAR * first,
2071 uri = state->uri; 2071 uri = state->uri;
2072 2072
2073 /* Init parser */ 2073 /* Init parser */
2074 URI_FUNC(ResetParserState)(state); 2074 URI_FUNC(ResetParserStateExceptUri)(state);
2075 URI_FUNC(ResetUri)(uri); 2075 URI_FUNC(ResetUri)(uri);
2076 2076
2077 /* Parse */ 2077 /* Parse */
@@ -2211,9 +2211,9 @@ UriBool URI_FUNC(_TESTING_ONLY_ParseIpSix)(const URI_CHAR * text) {
2211 const URI_CHAR * const afterIpSix = text + URI_STRLEN(text); 2211 const URI_CHAR * const afterIpSix = text + URI_STRLEN(text);
2212 const URI_CHAR * res; 2212 const URI_CHAR * res;
2213 2213
2214 URI_FUNC(ResetParserState)(&parser);
2215 URI_FUNC(ResetUri)(&uri); 2214 URI_FUNC(ResetUri)(&uri);
2216 parser.uri = &uri; 2215 parser.uri = &uri;
2216 URI_FUNC(ResetParserStateExceptUri)(&parser);
2217 parser.uri->hostData.ip6 = malloc(1 * sizeof(UriIp6)); 2217 parser.uri->hostData.ip6 = malloc(1 * sizeof(UriIp6));
2218 res = URI_FUNC(ParseIPv6address2)(&parser, text, afterIpSix); 2218 res = URI_FUNC(ParseIPv6address2)(&parser, text, afterIpSix);
2219 URI_FUNC(FreeUriMembers)(&uri); 2219 URI_FUNC(FreeUriMembers)(&uri);