summaryrefslogtreecommitdiff
path: root/include/uriparser
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhsoting.net>2014-10-20 18:43:39 +0200
committerJörg Frings-Fürst <debian@jff-webhsoting.net>2014-10-20 18:43:39 +0200
commit7cf57ee38648ce5729b97209e4bf87ae92c726b6 (patch)
tree7a1e89b9c5e85db7ecd736cb0fa375277de8def1 /include/uriparser
parent58048f62e9ce8d1754192edd702f7f3bbcea24c6 (diff)
parentc3ccf5e3e6737f81863b085289fd830e732b41f9 (diff)
Merge tag 'upstream/0.8.1'
Upstream version 0.8.1
Diffstat (limited to 'include/uriparser')
-rw-r--r--include/uriparser/Uri.h25
-rw-r--r--include/uriparser/UriBase.h17
2 files changed, 36 insertions, 6 deletions
diff --git a/include/uriparser/Uri.h b/include/uriparser/Uri.h
index bb5b684..4a18580 100644
--- a/include/uriparser/Uri.h
+++ b/include/uriparser/Uri.h
@@ -347,7 +347,7 @@ const URI_CHAR * URI_FUNC(UnescapeInPlace)(URI_CHAR * inout);
* @param absoluteBase <b>IN</b>: Base %URI to apply
* @return Error code or 0 on success
*
- * @see uriRemoveBaseUriA
+ * @see uriRemoveBaseUriA, uriAddBaseUriExA
* @since 0.4.0
*/
int URI_FUNC(AddBaseUri)(URI_TYPE(Uri) * absoluteDest,
@@ -357,6 +357,27 @@ int URI_FUNC(AddBaseUri)(URI_TYPE(Uri) * absoluteDest,
/**
+ * Performs reference resolution as described in
+ * <a href="http://tools.ietf.org/html/rfc3986#section-5.2.2">section 5.2.2 of RFC 3986</a>.
+ * NOTE: On success you have to call uriFreeUriMembersA on \p absoluteDest manually later.
+ *
+ * @param absoluteDest <b>OUT</b>: Result %URI
+ * @param relativeSource <b>IN</b>: Reference to resolve
+ * @param absoluteBase <b>IN</b>: Base %URI to apply
+ * @param options <b>IN</b>: Configuration to apply
+ * @return Error code or 0 on success
+ *
+ * @see uriRemoveBaseUriA, uriAddBaseUriA
+ * @since 0.8.1
+ */
+int URI_FUNC(AddBaseUriEx)(URI_TYPE(Uri) * absoluteDest,
+ const URI_TYPE(Uri) * relativeSource,
+ const URI_TYPE(Uri) * absoluteBase,
+ UriResolutionOptions options);
+
+
+
+/**
* Tries to make a relative %URI (a reference) from an
* absolute %URI and a given base %URI. This can only work if
* the absolute %URI shares scheme and authority with
@@ -371,7 +392,7 @@ int URI_FUNC(AddBaseUri)(URI_TYPE(Uri) * absoluteDest,
* @param domainRootMode <b>IN</b>: Create %URI with path relative to domain root
* @return Error code or 0 on success
*
- * @see uriAddBaseUriA
+ * @see uriAddBaseUriA, uriAddBaseUriExA
* @since 0.5.2
*/
int URI_FUNC(RemoveBaseUri)(URI_TYPE(Uri) * dest,
diff --git a/include/uriparser/UriBase.h b/include/uriparser/UriBase.h
index e93a3a8..3c6615f 100644
--- a/include/uriparser/UriBase.h
+++ b/include/uriparser/UriBase.h
@@ -54,8 +54,8 @@
/* Version */
#define URI_VER_MAJOR 0
-#define URI_VER_MINOR 7
-#define URI_VER_RELEASE 6
+#define URI_VER_MINOR 8
+#define URI_VER_RELEASE 1
#define URI_VER_SUFFIX_ANSI ""
#define URI_VER_SUFFIX_UNICODE URI_ANSI_TO_UNICODE(URI_VER_SUFFIX_ANSI)
@@ -155,7 +155,7 @@ typedef struct UriIp6Struct {
/**
- * Specifies a line break conversion mode
+ * Specifies a line break conversion mode.
*/
typedef enum UriBreakConversionEnum {
URI_BR_TO_LF, /**< Convert to Unix line breaks ("\\x0a") */
@@ -184,5 +184,14 @@ typedef enum UriNormalizationMaskEnum {
-#endif /* URI_BASE_H */
+/**
+ * Specifies how to resolve %URI references.
+ */
+typedef enum UriResolutionOptionsEnum {
+ URI_RESOLVE_STRICTLY = 0, /**< Full RFC conformance */
+ URI_RESOLVE_IDENTICAL_SCHEME_COMPAT = 1 << 0 /**< Treat %URI to resolve with identical scheme as having no scheme */
+} UriResolutionOptions; /**< @copydoc UriResolutionOptionsEnum */
+
+
+#endif /* URI_BASE_H */