mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
[Network, DOM] Align our implementation with the current CORS/Fetch spec.
This commit is contained in:
parent
bf19c2087b
commit
37f0199c79
9 changed files with 366 additions and 31 deletions
|
|
@ -245,6 +245,18 @@ nsHttp::GetProtocolVersion(uint32_t pv)
|
|||
}
|
||||
}
|
||||
|
||||
// static
|
||||
void
|
||||
nsHttp::TrimHTTPWhitespace(const nsACString& aSource, nsACString& aDest)
|
||||
{
|
||||
nsAutoCString str(aSource);
|
||||
|
||||
// HTTP whitespace 0x09: '\t', 0x0A: '\n', 0x0D: '\r', 0x20: ' '
|
||||
static const char kHTTPWhitespace[] = "\t\n\r ";
|
||||
str.Trim(kHTTPWhitespace);
|
||||
aDest.Assign(str);
|
||||
}
|
||||
|
||||
// static
|
||||
bool
|
||||
nsHttp::IsReasonableHeaderValue(const nsACString &s)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue