mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #19214 from Snuffleupagus/issue-19205
Don't remove trailing regular spaces from the "raw" response headers (issue 19205)
This commit is contained in:
commit
322616988e
1 changed files with 2 additions and 1 deletions
|
@ -288,7 +288,8 @@ class PDFNetworkStreamFullRequestReader {
|
|||
const responseHeaders = new Headers(
|
||||
rawResponseHeaders
|
||||
? rawResponseHeaders
|
||||
.trim()
|
||||
.trimStart()
|
||||
.replace(/[^\S ]+$/, "") // Not `trimEnd`, to keep regular spaces.
|
||||
.split(/[\r\n]+/)
|
||||
.map(x => {
|
||||
const [key, ...val] = x.split(": ");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue