bare-url 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/prebuilds/android-arm/bare-url.bare +0 -0
- package/prebuilds/android-arm64/bare-url.bare +0 -0
- package/prebuilds/android-ia32/bare-url.bare +0 -0
- package/prebuilds/android-x64/bare-url.bare +0 -0
- package/prebuilds/darwin-arm64/bare-url.bare +0 -0
- package/prebuilds/darwin-x64/bare-url.bare +0 -0
- package/prebuilds/ios-arm64/bare-url.bare +0 -0
- package/prebuilds/ios-arm64-simulator/bare-url.bare +0 -0
- package/prebuilds/ios-x64-simulator/bare-url.bare +0 -0
- package/prebuilds/linux-arm64/bare-url.bare +0 -0
- package/prebuilds/linux-x64/bare-url.bare +0 -0
- package/prebuilds/win32-arm64/bare-url.bare +0 -0
- package/prebuilds/win32-x64/bare-url.bare +0 -0
- package/vendor/liburl/src/parse.h +10 -0
- package/vendor/libutf/include/utf/string.h +2 -1
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -828,6 +828,11 @@ url__parse (url_t *url, const utf8_string_view_t input, const url_t *base) {
|
|
|
828
828
|
url->components.port = base->components.port;
|
|
829
829
|
}
|
|
830
830
|
} else {
|
|
831
|
+
if (base->components.scheme_end + 3 /* :// */ == base->components.username_end) {
|
|
832
|
+
err = utf8_string_append_literal(&url->href, (utf8_t *) "//", 2);
|
|
833
|
+
if (err < 0) goto err;
|
|
834
|
+
}
|
|
835
|
+
|
|
831
836
|
url->components.username_end = url->href.len;
|
|
832
837
|
url->components.host_start = url->href.len;
|
|
833
838
|
url->components.host_end = url->href.len;
|
|
@@ -928,6 +933,11 @@ url__parse (url_t *url, const utf8_string_view_t input, const url_t *base) {
|
|
|
928
933
|
if (err < 0) goto err;
|
|
929
934
|
}
|
|
930
935
|
} else {
|
|
936
|
+
if (url->type == url_type_opaque && base->components.scheme_end + 3 /* :// */ == base->components.username_end) {
|
|
937
|
+
err = utf8_string_append_literal(&url->href, (utf8_t *) "//", 2);
|
|
938
|
+
if (err < 0) goto err;
|
|
939
|
+
}
|
|
940
|
+
|
|
931
941
|
url->components.username_end = url->href.len;
|
|
932
942
|
url->components.host_start = url->href.len;
|
|
933
943
|
url->components.host_end = url->href.len;
|
|
@@ -43,7 +43,8 @@ utf8_string_init (utf8_string_t *string) {
|
|
|
43
43
|
|
|
44
44
|
inline utf8_string_view_t
|
|
45
45
|
utf8_string_view_init (const utf8_t *data, size_t len) {
|
|
46
|
-
|
|
46
|
+
utf8_string_view_t view = {data, len};
|
|
47
|
+
return view;
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
inline void
|