Skip to content

Commit

Permalink
Merge pull request #19214 from Snuffleupagus/issue-19205
Browse files Browse the repository at this point in the history
Don't remove trailing regular spaces from the "raw" response headers (issue 19205)
  • Loading branch information
timvandermeij authored Dec 15, 2024
2 parents a8c35a9 + 08e5405 commit 3226169
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/display/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(": ");
Expand Down

0 comments on commit 3226169

Please sign in to comment.