Best way to Load CGI program?

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

Best way to Load CGI program?

Postby ThinkingMan » Sat Apr 01, 2017 10:16 pm

There are probably multiple ways to do this, but what would be the best or easiest way to simply load a cgi (windows exe/linux elf) program into chromium embedded?

I can think of several ways... but is there an easy way? It should be as simple as LoadCGI() or something, but, I think that function I will have to create myself as obviously there is not one. Loading a cgi will have to deal with post/get parameters, HTTP headers (it's not just a simple plain static html page load).

As it currently stands, I think I will have to invent my own LoadCGI() function, and emulate cgi in some way, but maybe I missed something and Chromium Embedded already has a feature like it?

Possible solutions: piping the data from an exe/elf back into chromium embedded: this is essentially what apache does. But why reinvent apache if chromium embedded maybe already has a cgi loading feature that I missed?
ThinkingMan
Techie
 
Posts: 10
Joined: Wed Mar 01, 2017 11:52 am

Re: Best way to Load CGI program?

Postby Czarek » Wed Apr 12, 2017 11:40 am

CGI is a web server feature, CEF doesn't have anything like this.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Best way to Load CGI program?

Postby ThinkingMan » Sat Apr 15, 2017 8:39 pm

Czarek wrote:CGI is a web server feature, CEF doesn't have anything like this.


Okay, but don't worry, it will very soon. ;-) (When I create a offline cgi loader system with chromium embedded.)

But, that will be a cef application demo, not probably a loadcgi function in the cef sources itself.

Likely someone has already thought of this idea 10 years ago, to load cgi programs offline as desktop apps. So I'm concerned about reinventing the wheel
ThinkingMan
Techie
 
Posts: 10
Joined: Wed Mar 01, 2017 11:52 am

Re: Best way to Load CGI program?

Postby magreenblatt » Sat Apr 15, 2017 8:48 pm

CGI programs generally use a combination of environment variables and stdin/stdout. It should be pretty easy to drive one from C+++ using a function like exec().
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 22 guests