Re: Can I Make a Web Server in 15 Minutes?
Re: Can I Make a Web Server in 15 Minutes?
- Subject: Re: Can I Make a Web Server in 15 Minutes?
- From: Mark Pauley <email@hidden>
- Date: Wed, 20 Feb 2008 14:57:12 -0800
I recently did this for a functional HTTP test suite. I found that
the simplest way to proceed is to store the full http response in file
form and then use the scripting language of your choice to serve them
up based on the requested path.
I personally used ruby and GServer... took me about an hour to set up
something that would parse the HTTP request and serve up a file.
Another hour to add POST support. Now I just add files to the suite
any time I find a wonky http behavior that I want to test against to
make sure we do something sensible.
I'm sure there are tons of ways to do this, but my main recommendation
is that you look into using a good High Level Language or you will
likely be wasting your time debugging C.
_Mark
On Feb 20, 2008, at 12:29 PM, Jerry Krinock wrote:
My Macintosh application makes HTTP requests from third-party
servers that are beyond my control. So, I've designed in lots of
error recovery, but in order to test it I need to simulate poor
responses. For example, to test my timeout algorithms I need to
simulate a long-delayed server response.
It seems a good solution would be to set up a dumb little web server
on my Mac, or another Mac on the network, and have my app send
requests to it. I know lots of perl and found this tutorial
entitled "CGI Programming with Apache and Perl on Mac OS X":
http://www.cgi101.com/learn/connect/mac.html
Before embarking down this path, I was wondering if someone could
confirm that this is the correct (easiest) way to go. The link
above seems to date back to Jaguar. Is there a more recent resource
I should read instead?
Thanks,
Jerry Krinock
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden