File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 55#include " ada.h"
66#include " ada/implementation.h"
77#include " ada/helpers.h"
8+ #include " ada/scheme.h"
89
910#include < algorithm>
1011#include < string>
@@ -22,7 +23,10 @@ namespace ada {
2223 if (non_special_scheme == " blob" ) {
2324 if (!path.empty ()) {
2425 auto result = ada::parse<ada::url>(path);
25- if (result && result->is_special ()) {
26+ if (result &&
27+ (result->type == scheme::HTTP || result->type == scheme::HTTPS)) {
28+ // If pathURL’s scheme is not "http" and not "https", then return a
29+ // new opaque origin.
2630 return ada::helpers::concat (result->get_protocol (), " //" ,
2731 result->get_host ());
2832 }
Original file line number Diff line number Diff line change @@ -634,7 +634,9 @@ bool url_aggregator::set_hostname(const std::string_view input) {
634634 std::string_view path = get_pathname ();
635635 if (!path.empty ()) {
636636 auto out = ada::parse<ada::url_aggregator>(path);
637- if (out && out->is_special ()) {
637+ if (out && (out->type == scheme::HTTP || out->type == scheme::HTTPS)) {
638+ // If pathURL’s scheme is not "http" and not "https", then return a
639+ // new opaque origin.
638640 return helpers::concat (out->get_protocol (), " //" , out->get_host ());
639641 }
640642 }
You can’t perform that action at this time.
0 commit comments