Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Extending Apache Server Doubts???

16 views
Skip to first unread message

mitra

unread,
Jun 16, 2004, 5:22:44 AM6/16/04
to
Sub: Extension of Functionality of Apache

Hi,
I want to know if the following is possible in Apache in Linux
Platform.
and if possible, what should be done to make it possible(method for
implementing it)

1) In My Model, If someone sends a Http Request, Then I want Apache
to
Pass the Request (Entire Data) to "My Code". "My Code" will
process
the data and it will give back the "results" to apache,
which i want the apache to send it back to the person/process
which
sent the request.

What I intent to do is: I am going to embedded certain "private"
commands
in the Http Request Packet (Data Part) and i am going to carry
out
those commands, what i should do whenever certain commands come,
"My Code"
will decide.


Can I do like what i described above in apache.


How do i do it ?.

Someone told me, that u can do that using scripts (cgi and perl).

I want to do it in "C" Language. Can I do it.


Has anyone done tis before, Please Explain in detail with
examples.


Searching the internet has not helped me.Any specific
resources/Experiences
will help me.

Thanks,
Mitra

Klaus Johannes Rusch

unread,
Jun 16, 2004, 10:18:33 AM6/16/04
to
mitra wrote:

> I want to know if the following is possible in Apache in Linux
> Platform.
> and if possible, what should be done to make it possible(method for
> implementing it)

Which of your questions was not answered in
<news:2ittvtF...@uni-berlin.de>, where you had essentially posted
the same questions?

Did you look at the CGI documentation referenced in that response?


--
Klaus Johannes Rusch
Klaus...@atmedia.net
http://www.atmedia.net/KlausRusch/

Juha Laiho

unread,
Jun 16, 2004, 12:32:03 PM6/16/04
to
prana...@mail.com (mitra) said:
>Sub: Extension of Functionality of Apache
>
> I want to know if the following is possible in Apache in Linux
>Platform.
...

> Someone told me, that u can do that using scripts (cgi and perl).
>
> I want to do it in "C" Language. Can I do it.

So far nothing that could not be done. You can perfectly well write
programs conforming to the CGI interface specification in C. I recommend
looking for some pre-existing libraries handling at least parts of the
CGI request processing.

Another way would be to write your code to directly integrate to Apache,
but I'd guess that way is more risky (bugs in your code might cause
overall problems in the Apache), and also I guess direct Apache integration
would be harder than writing to the CGI interface.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)

Joe Schaefer

unread,
Jun 16, 2004, 1:49:54 PM6/16/04
to
Juha Laiho <Juha....@iki.fi> writes:

> prana...@mail.com (mitra) said:
> >Sub: Extension of Functionality of Apache
> >
> > I want to know if the following is possible in Apache in Linux
> >Platform.
> ...
> > Someone told me, that u can do that using scripts (cgi and perl).
> >
> > I want to do it in "C" Language. Can I do it.
>
> So far nothing that could not be done. You can perfectly well write
> programs conforming to the CGI interface specification in C. I recommend
> looking for some pre-existing libraries handling at least parts of the
> CGI request processing.
>
> Another way would be to write your code to directly integrate to Apache,
> but I'd guess that way is more risky (bugs in your code might cause
> overall problems in the Apache), and also I guess direct Apache integration
> would be harder than writing to the CGI interface.

[plug] If mita's running apache2, give libapreq2 a try

http://httpd.apache.org/apreq/

It's a server-side request parsing library that works for both CGI C "scripts"
and Apache modules. A sample CGI C app is env/t/test_cgi.c in the
libapreq2 distribution, with sample Apache modules in env/c-modules.


--
Joe Schaefer

0 new messages