Open wolkykim opened 10 years ago
qDecoder was/is about the last active CGI library project in C (with FastCGI support) I could find. Or maybe people just don't use one in their projects (looking at cgit here). For now it's just a learning experience, i'm not using it actively. But it occured to me that I'd like to replace some functionality of a big ugly php webshop not-to-be-named with small, speedy FastCGI scripts (KISS principle and all that). Can't say if I'll get around to that, or if I could manage that in C, yet.
I like qDecoder because it sticks to the relevant things. It doesn't try to be a magic form builder or c-to-html template engine, and I can work with that. The license is amazing, too.
Thanks for qDecoder. Included in how-to at http://www.linuxmovies.org/2015/10/cmake-hello-world-how-to-with-qdecoder/
Robin
I'm evaluating it against cgic, which are arguably the best two c cgi lib with a free license now.
the last release is in 2014.5, since then there are many commits, any plan to release a newer version?
@laoshaw Hey, git shows many commits but it's a sort of a sync error. I just released a 12.0.6 as a maintenance release. Check it out! Thx
Hi, thank you for sharing this great lib with us. We're using it with fastcgi. Everything works like a charm so far, except one problem which we can't repeat every time and have no idea what causes the problem. Appreciated if you could give some advices.
Let me explain what we're doing first. We build a fastcgi loop for accept the requests and use qDecoder to process the requests and session. There is a variable "logged" we save into the session to indicate if the user has logged in. We destroy the session when the user sent "logout" request. The problem seems related to this session handling.
while(FCGI_Accept() >= 0) { qentry_t req = qcgireq_parse(NULL, Q_CGI_ALL); qentry_t sess=qcgisess_init(req, NULL); bool bNeedDestroySession=false;
if it is a login req
req->putstr(sess,"logged","1",true);
else if it is a logout req
bNeedDestroySession=true;
qcgisess_save(sess);
if(bNeedDestroySession==false) sess->free(sess); else qcgisess_destroy(sess);
req->free(req);
}
I've been using this library for many years to create CGI commandline applications with Visual Studio 6. I'm actually trying to upgrade the applications and compile then in VS 2017 or at least VS 2008, but there is a compile error in the version of qdecoder.h I have from years ago, and I don't see that you still include code for Visual Studio. Is there still a Win32 version being maintained?
I'm facing the same issue... Being able to compile on modern compilers or VS2017 using C++14.. I need cross platform support for Win/Linux. Given that everything is old, it's impossible to find a CGI library now. I do think this is the best one that I found however. Thinking about taking on a porting project to get it up to date on modern compilers.
@chrisw24 There are alternatives to CGI these days which may be why you're seeing less development done with it. Another approach is to use a web proxy on your main server and run a full HTTP server like Boost.Beast.
qdecoder is useful for some restricted embedded devices, small and neat, Boost.Beast with proxy is not a good alternative there. cgic https://github.com/boutell/cgic might be a close alternative but I personally favor qdecoder. I hope this code can be updated by someone skillful.
@Erroneous1 Yeah, I've been out of the game for some time.. I've seen lots of projects with boost.beast and think I need to modernize my best practices for web application development. Need to get up to speed on C++14 and C++17 as well. Lots of changes since 2010. Thanks for the suggestion, I will for sure review boost.beast.
I needed a small lightweight JS engine to run JavaScript scripts via Fast CGI for IoT. A combination of my own code, Duktape and qdecoder solved the problem. :-)
Using it from almost 10-15 years. (when it was not on github)
It's always my great pleasure to know how it gets used. Please leave your comment if you're using qDecoder. Many thanks.