diff options
| author | Jannis R <mail@jannisr.de> | 2020-05-03 16:36:38 +0200 |
|---|---|---|
| committer | Jannis R <mail@jannisr.de> | 2020-05-03 16:36:38 +0200 |
| commit | be032e4a620576dc42b6814a6114e3fcbc18feb2 (patch) | |
| tree | 7e93a6520fdaad5cda55b5beaa0b98f3d81b5caf /lib | |
| parent | 0e0eb67c7f43338bb2c28f4a354ef2ab95bae6ff (diff) | |
minor changes, docs :memo:
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/request-parser.js | 1 | ||||
| -rw-r--r-- | lib/response-parser.js | 14 |
2 files changed, 7 insertions, 8 deletions
diff --git a/lib/request-parser.js b/lib/request-parser.js index 04c5cd6..6cfba3d 100644 --- a/lib/request-parser.js +++ b/lib/request-parser.js @@ -1,7 +1,6 @@ 'use strict' const {Transform} = require('stream') -const {MESSAGES} = require('./statuses') // https://gemini.circumlunar.space/docs/spec-spec.txt, 1.2 // > Gemini requests are a single CRLF-terminated line with the diff --git a/lib/response-parser.js b/lib/response-parser.js index cb50f0a..2d64a47 100644 --- a/lib/response-parser.js +++ b/lib/response-parser.js @@ -79,12 +79,12 @@ const createResponseParser = () => { return out } -const p = createResponseParser() -p.on('error', console.error) -p.on('header', h => console.log('header', h)) -p.on('data', d => console.log('data', d.toString('utf8'))) -const b = str => Buffer.from(str, 'utf8') -p.write(b('31 gemini://examp')) -p.write(b('le.org/foo?bar\r\n')) +// const p = createResponseParser() +// p.on('error', console.error) +// p.on('header', h => console.log('header', h)) +// p.on('data', d => console.log('data', d.toString('utf8'))) +// const b = str => Buffer.from(str, 'utf8') +// p.write(b('31 gemini://examp')) +// p.write(b('le.org/foo?bar\r\n')) module.exports = createResponseParser |
