Comments (11)
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.
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.
from ulfius.
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.
from ulfius.
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.
Hi @pluto-skaalhelarsen ,
Any update on this bug?
from ulfius.
from ulfius.
I'm not sure I understand everything you say but OK :)
from ulfius.
from ulfius.
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)
- [Issue] simple_example: build failed HOT 1
- ulfius_add_endpoint_by_val() url_prefix VS. url_format HOT 2
- HTTP GET with array as response body HOT 2
- simple_example as static build for managed server HOT 2
- undefined reference to `pointer_list_init' HOT 2
- How to setup https mode? HOT 4
- Sending file in response for Ulfius REST request
- Do we have any official Ulifius Yocto recipe? HOT 1
- How can I reopen a closed issue? HOT 4
- [Issue]../../src/libulfius.so: undefined reference to `[email protected]' HOT 1
- [Issue] A use after free bug in src/ulfius.c HOT 1
- [Issue]A double free bug in ulfius.c HOT 4
- [Issue]A use after free bug in src/ulfius.c HOT 1
- [Feature request] How to use libulfius to implement a secure, asynchronious and scalable REST API? HOT 3
- What is the best way to let libulfius interact with libpq? HOT 2
- uwsc can't connect to socket while wscat can HOT 2
- Ulfius failed to link microhttpd on mingw64 using CMake HOT 4
- Support for graceful shutdown HOT 2
- How to add swagger openAPI documentation for ulfius based webservices ? HOT 3
- Issue faced in file_upload_callback in Ulfius TLS mode [HTTPS] HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ulfius.