Coder Social home page Coder Social logo

HTTPS Parse Error about kappa HOT 9 CLOSED

krakenjs avatar krakenjs commented on June 10, 2024
HTTPS Parse Error

from kappa.

Comments (9)

drkibitz avatar drkibitz commented on June 10, 2024

The error:

{ [Error: Parse Error] bytesParsed: 0, code: 'HPE_INVALID_METHOD' }

from kappa.

drkibitz avatar drkibitz commented on June 10, 2024

I think this is probably with the version of hapi. I did try a simple update and the latest hapi version is incompatible with kappa.

from kappa.

drkibitz avatar drkibitz commented on June 10, 2024

Turns out is was because of mis-documentation. These say "tls" is a sibling of "options", https://github.com/krakenjs/kappa/blob/master/example/local/config.json#L10-L15
https://github.com/krakenjs/kappa/blob/master/example/global/config.json#L11-L16

When in fact it, "tls" should be a member of "options".

{
    "host": "localhost",
    "port": "env:SSL_PORT|d",
    "options": {
        "tls": {
            "requestCert": true,
            "rejectUnauthorized": true,
            "key": "file:../key.pem",
            "cert": "file:../cert.pem"
        },
        "payload": { "maxBytes": 10000000 }
    }
}

from kappa.

drkibitz avatar drkibitz commented on June 10, 2024

I also tested locally editing kappa to get it compatible with hapi 5.0. Turns out the only things that needed changed was references to undefined functions in hapi.utils. These should now be called directly on "hoek". Made those changes, and worked with hapi 5.0.

from kappa.

totherik avatar totherik commented on June 10, 2024

thanks for digging into this @drkibitz. so is this problem due to changes between versions of hapi or incorrect docs in kappa? if the latter, would it be helpful to call out the different configs by version?

from kappa.

drkibitz avatar drkibitz commented on June 10, 2024

@totherik Incorrect docs in kappa. I was just mentioning how easy it was to up hapi to latest.

from kappa.

drkibitz avatar drkibitz commented on June 10, 2024

It was my understanding that the config object is dictated by node's http module, not hapi. I could be mistaken.

from kappa.

totherik avatar totherik commented on June 10, 2024

Ahh gotcha, so the examples are just missing an options property/object between server and tls. That's easy enough to correct.

from kappa.

jasisk avatar jasisk commented on June 10, 2024

Closed by #61

from kappa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.