Giter VIP home page Giter VIP logo

Comments (11)

babelouest avatar babelouest commented on May 18, 2024

Thanks for the bug report, you're right, I was overwriting the previous values like a savage.
I fixed it in the branch 2.1 which is in beta mode, expected to be released soon. If you feel like it, you can run some tests.
https://github.com/babelouest/ulfius/tree/2.1

from ulfius.

babelouest avatar babelouest commented on May 18, 2024

FYI, to be compatible with the HTTP 1.1 rfc, if multiple header name are sent by the server in the response, the values will be joined in a single header value, separated by a comma ,.

from ulfius.

pluto-skaalhelarsen avatar pluto-skaalhelarsen commented on May 18, 2024

from ulfius.

babelouest avatar babelouest commented on May 18, 2024

No, I mean you were right in the first place, there is a bug in the headers management.

The HTTP rfc states that:

  • You can have multiple headers with the same name but it isn't recommended
  • To have multiple values in a single header, you must separate them with a comma ,
  • In case of multiple headers with the same name, the name is case-insensitive

So in the end, with the patch, Ulfius concatenates header values that have the same (case insensitive) name in a single value, separated by a comma, and in case of multiple header names that are case-insensitive equal but case-sensitive different, the header name will be one of them, but I don't guarantee which one.

Can you test if your problem is fixed in the branch 2.1? I'd like to release it soon.

from ulfius.

pluto-skaalhelarsen avatar pluto-skaalhelarsen commented on May 18, 2024

from ulfius.

babelouest avatar babelouest commented on May 18, 2024

Hi,

Actually I've ran all my tests set and the branch 2.1 passed them all, so I've released it earlier today. This is now in the master branch. All you have to do now is getting the last code and rebuild it. It should be fine. Let me know if you have any other problems with the fix.

And yeah, ulfius was one of the knights of the round table. There is no allegory or meaning of the name, rather than it's my tradition to name my projects among the Arthurian legend. Although some of my other projects try to have a meaningful name somehow, like glewlwyd that is my oauth2 server and was the gatekeeper at Camelot, ulfius when I named it was named like that for now specific reason...

from ulfius.

babelouest avatar babelouest commented on May 18, 2024

Hi @pluto-skaalhelarsen ,

Any update on this bug?

from ulfius.

pluto-skaalhelarsen avatar pluto-skaalhelarsen commented on May 18, 2024

from ulfius.

babelouest avatar babelouest commented on May 18, 2024

I'm not sure I understand everything you say but OK :)

from ulfius.

pluto-skaalhelarsen avatar pluto-skaalhelarsen commented on May 18, 2024

from ulfius.

babelouest avatar babelouest commented on May 18, 2024

Yeah, unfortunately I see now there's some lack in the upgrade to Ulfius 2.0 paragraph in the documentation.

Not only Ulfius changed in the last branch, but the underlying libraries too: Orcania and Yder.

This means recompiling/installing orcania and yder before compiling ulfius.

I don't have made packages for ulfius, but for a given version, the lib/ folder is supposed to contain the correct version of underlying libraries.

Whatever the version you want to use, you must run the command git submodule update, then build and install orcania and yder, then install ulfius.

The function ulfius_set_json_body_request is the one up to date, but nstrcmp and nstrdup are deprecated, which suggest you're linking with an old ulfius library but with an up to date orcania library.

So I suggest you reinstall orcania/yder/ulfius from scratch, and try again to recompile your program with the last library.
You can check the version of the library you're using by checking the header files copied in your /usr/local/include directory.
Normally, with the last Ulfius version, you should see the following versions in you files:
Ulfius 2.1: https://github.com/babelouest/ulfius/blob/master/src/ulfius.h#L58
Orcania 1.1: https://github.com/babelouest/orcania/blob/4a25e40705c371d9e95a22ee8d6ab59cf7ebd1de/src/orcania.h#L17
Yder 2.0: https://github.com/babelouest/yder/blob/e9e7e04541407162370aaee8837e218b6a5b9fd3/src/yder.h#L29

from ulfius.

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.