| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -109,6 +109,21 @@ case, `_`, lower case). | |||
| 109 | 109 | ||
| 110 | 110 | ### **Lines 11-22** | |
| 111 | 111 | ||
| 112 | + ```js | ||
| 113 | + const server = http.createServer(common.mustCall((req, res) => { | ||
| 114 | + res.end('ok'); | ||
| 115 | + })); | ||
| 116 | + server.listen(0, () => { | ||
| 117 | + http.get({ | ||
| 118 | + port: server.address().port, | ||
| 119 | + headers: { 'Test': 'Düsseldorf' } | ||
| 120 | + }, common.mustCall((res) => { | ||
| 121 | + assert.strictEqual(res.statusCode, 200); | ||
| 122 | + server.close(); | ||
| 123 | + })); | ||
| 124 | + }); | ||
| 125 | + ``` | ||
| 126 | + | ||
| 112 | 127 | This is the body of the test. This test is simple, it just tests that an | |
| 113 | 128 | HTTP server accepts `non-ASCII` characters in the headers of an incoming | |
| 114 | 129 | request. Interesting things to notice: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments