From be032e4a620576dc42b6814a6114e3fcbc18feb2 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Sun, 3 May 2020 16:36:38 +0200 Subject: minor changes, docs :memo: --- lib/request-parser.js | 1 - lib/response-parser.js | 14 +++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'lib') 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 -- cgit v1.3