Commit d478a1c
authored
Tests: Fix Karma tests on Node.js 20
Node.js 20 started throwing errors when `writeHead` is called twice on
a response. This might have already been invalid before but it wasn't throwing
on Node.js 18.
Compute the headers object and call `writeHead` once to avoid the issue.
Closes gh-53971 parent b507c86 commit d478a1c
1 file changed
+5
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
| 83 | + | |
90 | 84 | | |
91 | 85 | | |
92 | 86 | | |
| |||
105 | 99 | | |
106 | 100 | | |
107 | 101 | | |
| 102 | + | |
108 | 103 | | |
109 | | - | |
| 104 | + | |
110 | 105 | | |
111 | 106 | | |
112 | | - | |
| 107 | + | |
113 | 108 | | |
| 109 | + | |
114 | 110 | | |
115 | 111 | | |
116 | 112 | | |
| |||
0 commit comments