Skip to content

Why does this work? #3

@spalger

Description

@spalger

Hey @mscdex

I'm interested in using this library to provide automatic redirection from http -> https (see elastic/kibana#5959) but we're concerned about the magic here.

Would you be able to support this implementation with some information about how/why this works?

var firstByte = d[start];
      if (firstByte < 32 || firstByte >= 127) {
        // tls/ssl

We are concerned about unintended side effects of serving both http and https traffic via the same port. Do you know of any caveats? Know of any supporting reference info?

Thank you so much for your help and this really neat (and surprisingly simple) library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions