Skip to content

Do not stop work on invalid HTTP requests #3

@d1ken

Description

@d1ken

I think caster should not stop work on invalid HTTP requests.
For example if I trying connect to https://mycaster:2101 from browser there are exception:

/root/mycaster/node_modules/http-parser-ts/build/index.js:114
throw err;
^

Error: Parse Error
at parseError (/root/mycaster/node_modules/@ntrip/caster/build/util/ntrip-http-parser.js:120:15)
at NtripHTTPParser.REQUEST_LINE (/root/mycaster/node_modules/@ntrip/caster/build/util/ntrip-http-parser.js:42:19)
at NtripHTTPParser.execute (/root/mycaster/node_modules/http-parser-ts/build/index.js:108:37)
at socketOnData (_http_server.js:581:22)
at Socket.emit (events.js:314:20)
at addChunk (_stream_readable.js:307:12)
at readableAddChunk (_stream_readable.js:282:9)
at Socket.Readable.push (_stream_readable.js:221:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23) {
code: 'HPE_INVALID_CONSTANT'
}

I think it should somewhere be catched and logged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions