Commit 10ec0012 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

src: Don't process rel=preload again once we found it

parent 2d6211c4
......@@ -924,6 +924,7 @@ parse_next_link_header_once(const char *first, const char *last) {
// we expect link-param
if (!ign) {
if (!ok) {
// rel can take several relations using quoted form.
static constexpr char PLP[] = "rel=\"";
static constexpr size_t PLPLEN = str_size(PLP);
......@@ -958,7 +959,7 @@ parse_next_link_header_once(const char *first, const char *last) {
start = first;
}
if (first == last) {
return {{StringRef{}}, first};
return {{StringRef{}}, last};
}
assert(*first == '"');
++first;
......@@ -972,6 +973,7 @@ parse_next_link_header_once(const char *first, const char *last) {
}
return {{StringRef{}}, last};
}
}
// we are only interested in rel=preload parameter. Others are
// simply skipped.
static constexpr char PL[] = "rel=preload";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment