wolkykim / qdecoder

qDecoder is a simple and powerful CGI library for C/C++ programming language.
http://wolkykim.github.io/qdecoder/
Other
42 stars 23 forks source link

Let us know if you're using qDecoder. #1

Open wolkykim opened 10 years ago

wolkykim commented 10 years ago

It's always my great pleasure to know how it gets used. Please leave your comment if you're using qDecoder. Many thanks.

nyov commented 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.

robinrowe commented 9 years ago

Thanks for qDecoder. Included in how-to at http://www.linuxmovies.org/2015/10/cmake-hello-world-how-to-with-qdecoder/

Robin

laoshaw commented 7 years ago

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?

wolkykim commented 7 years ago

@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

lookwei commented 7 years ago

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.

  1. If the user login back right after the "logout" request (after the session has just been destroyed) ;
  2. However, if they hold on for a couple of mins and then try login. All functions related to stdio will go wrong. I understand fastcgi has redefined the stdio.h in fcgi_stdio.h and qDecoder is using such definitions once in Fastcgi mode. But our functions are compiled and linked with standard stdio.h into a separate object file. In addition, they work well before we destroy the session. Is this because we haven't handled the session in the correct way? Please see attached a simplified version of our code.

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);

}

atariguy commented 5 years ago

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?

chrisw24 commented 4 years ago

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.

Erroneous1 commented 4 years ago

@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.

laoshaw commented 4 years ago

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.

chrisw24 commented 4 years ago

@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.

MelanieRed commented 3 years ago

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. :-)

amishmm commented 3 years ago

Using it from almost 10-15 years. (when it was not on github)