src: Don't process rel=preload again once we found it
This commit is contained in:
parent
2d6211c455
commit
10ec00126c
|
@ -924,6 +924,7 @@ parse_next_link_header_once(const char *first, const char *last) {
|
||||||
// we expect link-param
|
// we expect link-param
|
||||||
|
|
||||||
if (!ign) {
|
if (!ign) {
|
||||||
|
if (!ok) {
|
||||||
// rel can take several relations using quoted form.
|
// rel can take several relations using quoted form.
|
||||||
static constexpr char PLP[] = "rel=\"";
|
static constexpr char PLP[] = "rel=\"";
|
||||||
static constexpr size_t PLPLEN = str_size(PLP);
|
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;
|
start = first;
|
||||||
}
|
}
|
||||||
if (first == last) {
|
if (first == last) {
|
||||||
return {{StringRef{}}, first};
|
return {{StringRef{}}, last};
|
||||||
}
|
}
|
||||||
assert(*first == '"');
|
assert(*first == '"');
|
||||||
++first;
|
++first;
|
||||||
|
@ -972,6 +973,7 @@ parse_next_link_header_once(const char *first, const char *last) {
|
||||||
}
|
}
|
||||||
return {{StringRef{}}, last};
|
return {{StringRef{}}, last};
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// we are only interested in rel=preload parameter. Others are
|
// we are only interested in rel=preload parameter. Others are
|
||||||
// simply skipped.
|
// simply skipped.
|
||||||
static constexpr char PL[] = "rel=preload";
|
static constexpr char PL[] = "rel=preload";
|
||||||
|
|
Loading…
Reference in New Issue