GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - kristapsdz/kcgi: minimal CGI and FastCGI library for C/C++

BranchesTags
Open more actions menu

Latest commit

 

History

1,420 Commits
1,420 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
afl
afl
 
 
man
man
 
 
regress
regress
 
 
.gitignore
.gitignore
 
 
LICENSE.md
LICENSE.md
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
archive.css
archive.css
 
 
archive.xml
archive.xml
 
 
atom-template.xml
atom-template.xml
 
 
auth.c
auth.c
 
 
child.c
child.c
 
 
compats.c
compats.c
 
 
configure
configure
 
 
datetime.c
datetime.c
 
 
extending01-a.dot
extending01-a.dot
 
 
extending01-b.dot
extending01-b.dot
 
 
extending01-c.dot
extending01-c.dot
 
 
extending01-d.dot
extending01-d.dot
 
 
extending01.xml
extending01.xml
 
 
extern.h
extern.h
 
 
fcgi.c
fcgi.c
 
 
figure1.dot
figure1.dot
 
 
figure4.dot
figure4.dot
 
 
httpauth.c
httpauth.c
 
 
index.css
index.css
 
 
index.xml
index.xml
 
 
kcgi-html.in.pc
kcgi-html.in.pc
 
 
kcgi-json.in.pc
kcgi-json.in.pc
 
 
kcgi-regress.in.pc
kcgi-regress.in.pc
 
 
kcgi-xml.in.pc
kcgi-xml.in.pc
 
 
kcgi.c
kcgi.c
 
 
kcgi.h
kcgi.h
 
 
kcgi.in.pc
kcgi.in.pc
 
 
kcgihtml.c
kcgihtml.c
 
 
kcgihtml.h
kcgihtml.h
 
 
kcgijson.c
kcgijson.c
 
 
kcgijson.h
kcgijson.h
 
 
kcgiregress.c
kcgiregress.c
 
 
kcgiregress.h
kcgiregress.h
 
 
kcgixml.c
kcgixml.c
 
 
kcgixml.h
kcgixml.h
 
 
kfcgi.c
kfcgi.c
 
 
logging.c
logging.c
 
 
output.c
output.c
 
 
parent.c
parent.c
 
 
sample-fcgi.c
sample-fcgi.c
 
 
sample.c
sample.c
 
 
samplepp.cc
samplepp.cc
 
 
sandbox-capsicum.c
sandbox-capsicum.c
 
 
sandbox-darwin.c
sandbox-darwin.c
 
 
sandbox-pledge.c
sandbox-pledge.c
 
 
sandbox-seccomp-filter.c
sandbox-seccomp-filter.c
 
 
sandbox.c
sandbox.c
 
 
template.c
template.c
 
 
template.xml
template.xml
 
 
tests.c
tests.c
 
 
tutorial.css
tutorial.css
 
 
tutorial.xml
tutorial.xml
 
 
tutorial0.xml
tutorial0.xml
 
 
tutorial1.xml
tutorial1.xml
 
 
tutorial2.xml
tutorial2.xml
 
 
tutorial3.xml
tutorial3.xml
 
 
tutorial4.xml
tutorial4.xml
 
 
tutorial5.xml
tutorial5.xml
 
 
tutorial6.dot
tutorial6.dot
 
 
tutorial6.xml
tutorial6.xml
 
 
tutorial7.xml
tutorial7.xml
 
 
valgrind.suppressions
valgrind.suppressions
 
 
versions.xml
versions.xml
 
 
wrappers.c
wrappers.c
 
 

Repository files navigation

Introduction

kcgi is an open source CGI and FastCGI library for C/C++ web applications. It's minimal, secure, auditable, and fits within your BCHS software stack.

To keep up to date with the current stable release of kcgi, visit https://kristaps.bsd.lv/kcgi. The website also contains canonical installation, deployment, examples, and usage documentation.

Installation

You'll need a C compiler (gcc or clang), zlib (zlib or zlib-dev for some package managers), and BSD make (bmake for some managers) for building.

On some Linux systems, you might additionally need the Linux kernel headers installed using the linux-headers package or similar.

Begin by cloning or downloading. Then configure with ./configure, compile with make (BSD make, so it may be bmake on your system), then make install (or use sudo or doas, if applicable). To install in an alternative directory to /usr/local, set the PREFIX variable when you run configure.

./configure PREFIX=~/.local
make
make install

A common idiom for deploying on Linux is to use libbsd as noted in the oconfigure documentation:

./configure \
    CFLAGS=$(pkg-config --cflags libbsd-overlay) \
    LDFLAGS=$(pkg-config --libs libbsd-overlay)
make
make install

Testing

It's useful to run the installed regression tests on the bleeding edge sources. (Again, this uses BSD make, so it may be bmake on your system.) You'll need libcurl installed (curl-dev, libcurl-dev, or libcurl4-openssl-dev with some package managers).

make regress

The system contains a full regression suite and is also built to work with AFL. To run some of the bundled tests, use the binaries compiled into the afl directory. (Again, this uses BSD make, so it may be bmake on your system.)

make afl
cd afl
afl-fuzz -i in/urlencoded -o out -- ./afl-urlencoded

The public GitHub repository repository for kcgi uses automated testing on each check-in to run the regression tests. These automated tests are primarily aimed at Linux, whose security mechanism requires constant maintenance. The following systems are checked:

  • Alpine/musl Linux (latest, aarch64, sandboxed)
  • Alpine/musl Linux (latest, armv7, sandboxed)
  • Alpine/musl Linux (latest, ppc64le, sandboxed)
  • Alpine/musl Linux (latest, s390x, sandboxed)
  • Alpine/musl Linux (latest, x86_64, sandboxed)
  • FreeBSD (latest, x86_64, sandboxed)
  • Mac OS X (latest, arm64, sandboxed)
  • Ubuntu/glibc Linux (latest, x86_64, un-sandboxed)
  • Ubuntu/glibc Linux (latest, x86_64, sandboxed)
  • Ubuntu/glibc Linux (latest, x86_64, sandboxed, libbsd)

Development is primarily on OpenBSD.

These are also run weekly to catch any changes as new operating system features come into play.

License

All sources use the ISC (like OpenBSD) license. See the LICENSE.md file for details.

About

minimal CGI and FastCGI library for C/C++

kristaps.bsd.lv/kcgi

Topics

bchsccgicgi-scriptcplusplusfastcgifastcgi-library

Resources

Readme
ISC license
Activity

Stars

332 stars

Watchers

18 watching

Forks

46 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.