Coder Social home page Coder Social logo

Update to new http-parser API about bjoern HOT 10 OPEN

jonashaag avatar jonashaag commented on June 3, 2024
Update to new http-parser API

from bjoern.

Comments (10)

jonashaag avatar jonashaag commented on June 3, 2024 1

There aren't many real unittests -- most testing is done manually by simply starting some WSGI application and using a real browser.

what about development dependencies ?

What do you mean by that?

from bjoern.

sideffect0 avatar sideffect0 commented on June 3, 2024

@jonashaag what is it's status now ?

from bjoern.

jonashaag avatar jonashaag commented on June 3, 2024

I'm happy to see this done by someone else :-) There's no pressure for this, though, since the old version we're using works really well.

from bjoern.

sideffect0 avatar sideffect0 commented on June 3, 2024

how tests are organised, & what about development dependencies ?

from bjoern.

jelly avatar jelly commented on June 3, 2024

I would really like to package bjoern for Debian/Arch and the bundling of http-parser is generally "not done" for these distro's. I've made a branch with one commit c93574e to make it compatible with http-parser by renaming the offending enum, this leaves two minor compiler warnings.
I've tested the change with our API and so far it seems to work, how would I test this further?

My second more "controversial" change removes the bundling, making building it with system libs optional would be fine for me too. fe46216

from bjoern.

jelly avatar jelly commented on June 3, 2024

Update, I tested it further and it segfaults now with our full API testsuite:

segfault at a ip 00007fe76061da12 sp 00007ffca4e2a3f0 error 4 in _bjoern.cpython-37m-x86_64-linux-gnu.so[7fe76061d000+3000]

This was a bit of an ignorant update, I can see that the callbacks changed in http-parser and by luck it still compiled. Fixing that fixes the segfault, but in 53adfacad1c16ec7da7de4a0aee03c2d70f19618 they removed on_query_string which bjoern really needs and an alternative needs to be found for.

from bjoern.

jelly avatar jelly commented on June 3, 2024

@jonashaag any comments? tips?

from bjoern.

jonashaag avatar jonashaag commented on June 3, 2024

Sorry what’s your question exactly? There’s some kind of migration tips in the http parser documentation (not sure where but you’ll find it ;)

from bjoern.

jelly avatar jelly commented on June 3, 2024

Ah, well I couldn't find any migration documentation on https://github.com/nodejs/http-parser and there is a bugreport open for a CHANGES file.

from bjoern.

jonashaag avatar jonashaag commented on June 3, 2024

You're right, it's kind of difficult to find. There's some info here: nodejs/http-parser#54 and some here: nodejs/http-parser#58

I guess the best way is to compare the old README with the current one...

from bjoern.

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.