![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I want to write a large, complex CGI program.
However, I do *not* feel like installing and configuring Apache just so
I can run my CGI program.
Does *anybody* know of a nice, simple little program that will accept
HTTP requests and pass them to my CGI program? All I really want is a
tiny little program to parse the HTTP headers, feed them into my CGI
program, and pass back the answers to the web browser. But I can't seem
to find anything that will do that... All I can find is full-featured
web servers that you have to install and configure. I just want a
single-file executable... Anybody know of one?
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Invisible <voi### [at] dev null> wrote:
> Does *anybody* know of a nice, simple little program that will accept
> HTTP requests and pass them to my CGI program?
Any unix command-line shell will do. HTTP is pure ascii.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
> Invisible <voi### [at] dev null> wrote:
>> Does *anybody* know of a nice, simple little program that will accept
>> HTTP requests and pass them to my CGI program?
>
> Any unix command-line shell will do. HTTP is pure ascii.
Yes, but parsing a HTTP request, putting the various parts of the
request into the necessary environment variables and piping to stdin
while running the CGI binary, parsing its output and adding HTTP headers
to send back to the web browser is... quite a lot of work. And a billion
opportunities for mistakes. Surely I can't be the first person on Earth
to have wanted to quickly test a CGI script without having to install a
web server?
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Invisible wrote:
> I want to write a large, complex CGI program.
>
> However, I do *not* feel like installing and configuring Apache just so
> I can run my CGI program.
>
> Does *anybody* know of a nice, simple little program that will accept
> HTTP requests and pass them to my CGI program? All I really want is a
> tiny little program to parse the HTTP headers, feed them into my CGI
> program, and pass back the answers to the web browser. But I can't seem
> to find anything that will do that... All I can find is full-featured
> web servers that you have to install and configure. I just want a
> single-file executable... Anybody know of one?
Maybe this one will work:
http://shttpd.sourceforge.net/
My Linux programming book has a simple server described in one of it's
chapters, but it's too long to type out here.
Regards,
John
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Invisible a écrit :
> Warp wrote:
>> Invisible <voi### [at] dev null> wrote:
>>> Does *anybody* know of a nice, simple little program that will accept
>>> HTTP requests and pass them to my CGI program?
>>
>> Any unix command-line shell will do. HTTP is pure ascii.
>
> Yes, but parsing a HTTP request, putting the various parts of the
> request into the necessary environment variables and piping to stdin
> while running the CGI binary, parsing its output and adding HTTP headers
> to send back to the web browser is... quite a lot of work. And a billion
> opportunities for mistakes. Surely I can't be the first person on Earth
> to have wanted to quickly test a CGI script without having to install a
> web server?
>
But what you describe looks awfully like a web server to me... Surely
there are some on this page that have a very minimal configuration:
http://en.wikipedia.org/wiki/Tiny_web_servers
I tried hiawatha and nullhttpd here and it seems to work. Didn't try CGI
though, and I'm on linux... Nullhttpd does not seem to be very nicely
documented though.
--
Vincent
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Vincent Le Chevalier wrote:
> But what you describe looks awfully like a web server to me...
Yeah - except that I don't *need* HTTPS, virtual hosting, customisable
HTTP error pages, multi-level access control with permission seperation,
complex logging facilities, the ability to run as a background service,
or any of the myriad of other stuff that a "real" HTTP server needs to
have. I just need something to run CGI binaries.
> Surely
> there are some on this page that have a very minimal configuration:
>
> http://en.wikipedia.org/wiki/Tiny_web_servers
I had a look here this morning. Sadly, almost everything requires you to
"install" it before you can use it. I was hoping for a single executable
solution.
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
John VanSickle wrote:
> Maybe this one will work:
>
> http://shttpd.sourceforge.net/
Looks promising...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>> Maybe this one will work:
>>
>> http://shttpd.sourceforge.net/
>
> Looks promising...
Hmm. Seems to work perfectly, except for two things:
1. For some reason, it takes about 45 seconds to start up. No CPU usage,
no network activity, it just seems to hang for 45 seconds. And then it
works normally.
2. It seems to be able to run CGI *scripts*, but not compiled,
executable binary programs. I'm still frobbing the configuration file,
but it's not looking good...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Orchid XP v8 wrote:
> 2. It seems to be able to run CGI *scripts*, but not compiled,
> executable binary programs. I'm still frobbing the configuration file,
> but it's not looking good...
OK, *finally*...
Create a small file called Foo.cgi that simply contains the line
#!Foo.exe
and *at last* the server does what I want it to!
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Vincent Le Chevalier <gal### [at] libertyallsurfsp amfr> wrote:
> But what you describe looks awfully like a web server to me...
Yeah. He wants a web server without installing a web server.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |