make apache 1.3.x on Win32 to listen on named pipes

Closed Posted Feb 21, 2009 Paid on delivery
Closed Paid on delivery

We need to make Apache 1.3.x be able to accept connections using Windows Named Pipes on Windows.

You have to modify Apache 1.3.x codebase so that depending on value of some global C variable, it either work as it used to be, OR listens for connections Windows Named Pipe (and don't create listening or outbound TCP sockets).

Explanation: we are using apache web server in one of our projects; our desktop app starts it locally (i.e. apache listens only on 127.0.0.1) and then app connects to it, and apache serves some php-based pages. But a lot of bizarre Windows firewalls nowadays prevent apps from listening on 127.0.0.1 and from connecting to 127.0.0.1, thus preventing our product from being run.

So we need to modify apache 1.3 codebase to make it listen and work on Windows Named Pipe.

The modified version should support several simultaneous connections correctly too.

It should work on Win2k and above.

We would also need to make Firefox to use Windows Named Pipes (we'll post this as a distinct project once this apache-related project is completed).

All your changes will go to single file http_main.c.

## Deliverables

You have to work with Apache [url removed, login to view] codebase. You can download it from here.

<[url removed, login to view]>

We need this to be implemented for this version only. We have no need to do this for other versions. We have not ever done it for other versions.

The single file that responds for all network IO seems to be src/main/http_main.c

Build everything using “nmake /f [url removed, login to view]? while in “src?? directory (assuming you have visual studio installed).

We’ve slightly changed our mind and wish that global variable that controls whether to listen on TCP sockets or named pipes should be controlled from command line; if some command line switch is specified (we propose ‘-P’ switch if it’s not already used for some other option; otherwise find some switch that is currently unused on Win32), then name of named pipe to listen at is specified after that switch, and it means that apache should listen at that named pipe only (no listening on tcp sockets); if the commandline switch ??"P is not specified, then Apache should listen on TCP sockets and shouldn’t use named pipes. The main() function for apache starts in the same file, at line 5504(search for line “int REALMAIN(int argc, char *argv[])?? in the code).

If “named-pipes?? mode is enabled (-P switch is specified), NO listening or outbound TCP sockets should be created by apache! Even for a fraction of a second (otherwise, it has no use for us ??" firewalls will block these sockets or will complain to the user).

**How to check the resultant code:**

Checking using custom tool

You will have to also create some tool that accesses URLs using named pipes OR modify existing one. We greatly recommend you to just modify ApacheBench ??" available in src\support\ab.c ??" it’s tiny, portable, and easy to modify.

With the testing tool, you will have to check that the modified server works, performing several requests to it in parallel. You will have to insure that it can serve up to 20 requests in parallel, and check that it can serve 2000 requests in total (and that there is no memory leak in apache itself after serving 2000 requests).

Also please check whether you open pipe in binary mode (if that makes sense on win32) by insuring that binary files (e.g. .exe files) transfer without corruption.

Also please check that huge files (but smaller than 2gb) transfer just fine with it too.

** **

Checking using EasyPhp-1.8

Download easy php version 1.8 (only 1.8 includes apache [url removed, login to view]) from here <[url removed, login to view]>

(direct link

[url removed, login to view]

) ??" 8mb. Install it using default options.

Build you modified apache (the one with named pipes support) hardcoding the default name for named pipe into it (making it always use that named pipe). Place [url removed, login to view] to c:\program files\ EasyPHP1-8\apache\

Start easyphp (c:\program files\ EasyPHP1-8\ [url removed, login to view]) and then try to access some “mysql administration?? pages using your testing tool (you have to ensure that at least php scripts are served via named pipes correctly).

**Project schedule**

1. We put 100% of funds to escrow

2. you modify apache

3. you create a tool to test it

4. you run your tool to test modified apache

5. you use modified apache with EasyPHP to test it.

6. send us some expiring binaries of both apache and test tool (e.g. make them work for 2 weeks since that date, or make some other limitation that will not allow us to use it fully, but allow us to test it fully)

7. we test your expiring apache and a testing tool

8. if everything works fine, we notify you that everything is ok.

9. you send us source code for your modifications

10. we review code, and if everything is fine, release funds.

**Additional requirements**

* The modified apache should use the same build system as it was using before (i.e. you would build it using “nmake /f [url removed, login to view]? while in “src?? directory).

* No new dependencies on additional libraries should be added for modified apache (e.g. ACE, [url removed, login to view] or .NET or something else). It’s ok for testing tool to have any dependencies (e.g. qt, [url removed, login to view], ACE, .NET etc)

* It should work fine whatever name of named pipe is passed on commandline (e.g. it can contain non-latin characters ??" e.g. Chinese). I.e. use Unicode properly.

* Resultant apache should work on win2k, xp, win2003, win2008 etc. No wn98/win95 support needed of course.

* You should not modify the lines in http_main.c besides changes necessary. I.e. don’t reformat the source code because you dislike indentation, if you’ve changed some lines and found the changes to be useless, revert those lines to original ones. I.e. try to change only those lines that you really change.

* You have to use version 1.3.33. Not some other version (e.g. [url removed, login to view])!

* You shouldn’t introduce new memory leaks.

* If name of named pipe passed after ??"P switch is already in use, exit Apache with error (i.e. can’t listen on that name).

* Lines of code you add to apache should be properly commented

* Resultant apache should work correctly as non-admin user too.

* Add all your changes to http_main.c. Don’t introduce new .c file just for your code.

Notes: We will need to implement Firefox support for connecting to web server using named pipes in the next project. If you would like to submit a bid for it, feel free to drop us a private message, and we’ll invite you to it.

C Programming Engineering Microsoft MySQL PHP Software Architecture Software Testing Windows Desktop

Project ID: #3658976

About the project

3 proposals Remote project Active Mar 25, 2009

3 freelancers are bidding on average $381 for this job

terminussl

See private message.

$297.5 USD in 14 days
(8 Reviews)
4.2
bucktracker

See private message.

$590.75 USD in 14 days
(26 Reviews)
4.2
vns955vw

See private message.

$255 USD in 14 days
(8 Reviews)
3.5