Coder Social home page Coder Social logo

cgiserver's Introduction

A Simple CGI Server

This is a small CGI server written in C. It has no dependencies outside of the provided files, assuming a POSIX-compatible operating environment.

By default, the server will try to run on port 80. You can supply a different port number as an argument, or edit the source to change the default port.

The server will serve files out of the pages directory, but you can change this as well by editing the source.

cgiserver's People

Contributors

frol avatar klange avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cgiserver's Issues

Don’t allow going outside PAGES_DIRECTORY

The server as it stands now will happily display things like /../, /../../, or ../../../../../../../../../../etc/passwd. (Note that most modern browsers and even curl will refuse to make such requests, but, say, HTTPie won’t, and there’s always telnet.) Such requests should be treated as if PAGES_DIRECTORY is the filesystem root.

In use

Hi!
I would like to congratulate you on the project. I needed something simple and functional to add some functionality in a small project, your code answered perfectly.

http://tutu.servehttp.com/

CGI not working

Hi Klange,

Thank you for put the cgiserver online. I compiled today on my Linux box, run cgiserver. The server runs on my localhost but it wont parse .php file, it spew out the script. Is it possible to add path to php interpreter instead of on pipe or socket?
That way we can use it for any cgi executable and make it more flexible and more generic.

Many thanks!

Hear from you soon!

God blesses!!!

Best regards,
Sanyaade

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.