• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can I Make a Web Server in 15 Minutes?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can I Make a Web Server in 15 Minutes?


  • Subject: Re: Can I Make a Web Server in 15 Minutes?
  • From: Glenn Anderson <email@hidden>
  • Date: Thu, 21 Feb 2008 09:49:44 +1300

At 12:29 pm -0800 20/2/2008, 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?

If you just want something that will spit out a canned response when your client connects to it, there are lots of approaches, what is easiest will depend on what you are most familiar with. If you like writing shell scripts, you could use the nc command with a shell script, check out the man page for nc. If you would find it easier to do something in C, grab the code I posted a couple of weeks ago on accept() and setsockopt() and add in recv, sleep, and send calls.


Glenn.
_______________________________________________
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


References: 
 >Can I Make a Web Server in 15 Minutes? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Can I Make a Web Server in 15 Minutes?
  • Next by Date: Re: Removing stale network service entries
  • Previous by thread: Can I Make a Web Server in 15 Minutes?
  • Next by thread: Re: Can I Make a Web Server in 15 Minutes?
  • Index(es):
    • Date
    • Thread