Sponsored Content
Top Forums Web Development Apache module development on apache 2.2 Post 302921211 by fishman2001 on Wednesday 15th of October 2014 03:57:44 PM
Old 10-15-2014
Apache module development on apache 2.2

Hi,
I'm new to developing modules for Apache. I understand the basics now and can develop something simple which allows a 'GET' request to happen, but what I want to do is actually 'POST' information to my site. I know the basic POST Request works and I can see that it is post by looking at request_rec->method. but what I can't seem to find is the information related to that post ie text message. would that be in the request_rec somewhere?

Also while I'm here, I need to set and retrieve cookie information is there any API infromation related to that?

Please help.

Thanks.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

get error while compiling apache with php module

hi, i'm compiling apache with php module after i finish compile mysql-4.0.0-alpha. i do it as the follow steps after untar'ed them in the same directory, 1) cd apache_1.3.22 ./configure 2) cd php-4.0.6 ./configure --with-mysql=/usr/local/mysql \ --with-apache=../apache_1.3.22 \... (2 Replies)
Discussion started by: jApHEth
2 Replies

2. Filesystems, Disks and Memory

Mog_Gzip a Module For Apache

Mod_gzip, at http://www.remotecommunications.com/apache/mod_gzip/ is a module for Apache that allows you to compress content from an Apache web server on-the-fly. It uses the same compression as gzip and no plugins or extra software is needed by your browser to take advantage of this product.... (0 Replies)
Discussion started by: binhnx2000
0 Replies

3. HP-UX

Module jk2 failed to load into apache server!!

Hi There, Does anyone knows what could be the problem if my apache server is running but unable to load JK2 module into the server. My HTTPS is running on Apache Server 2.0.49 with ssl enabled and compiled with Mod_ssl on HPUX-11.11i. In fact we have try out the following parameter, ... (4 Replies)
Discussion started by: e_jeffhang
4 Replies

4. UNIX for Dummies Questions & Answers

Howto locate locally installed Perl module for a CGI script in APACHE .htaccess

Hi, I have the following simple CGI script, just containg header: #!/usr/bin/perl -w use CGI ':standard'; use lib "/home/myname/lib/perl5/site_perl/5.8.5/"; use Mail::Sendmail; I also have included this directive in ~/public_html/.htaccess : SetEnv PERL5LIB... (0 Replies)
Discussion started by: monkfan
0 Replies

5. Solaris

Apache on Solaris10 configured with loadable module support?

I have Apache 2 webserver as delivered with the Solaris 10 installation. How to verify if Apache is configured with loadable module support? Or if needs to be recompiled with loadable module support. (2 Replies)
Discussion started by: kavera
2 Replies

6. UNIX and Linux Applications

Apache module compilation error

I'm trying to compile an apache module (a tutorial module, Apache 2 Module Tutorial - GNU Build Tools and the Development Environment) and I get errors like this: apr.h:273: error: expected ´=´, ´,´,´;´,´asm´ or ´__attribute__´ before ´apr_off_t´ those errors occur like 30 times in different... (4 Replies)
Discussion started by: hjalle
4 Replies

7. UNIX for Advanced & Expert Users

Apache module & perl problem

I have a very strange problem that I can't seem to solve. I have apache module which filters content and within that module I will add some more content based on this calls: int check; check = system("/usr/bin/check"); check is a perl-script that exits with value 1 if the file doesn't... (2 Replies)
Discussion started by: hjalle
2 Replies

8. Solaris

Compile PHP as an Apache module on Solaris

Hi, I need to install php 5.5.30 as an apache (2.4.17) module on Solaris 10. Please any help is wellcome. Some aditional info: /usr/sfw/bin/gcc -v Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs bash-3.2# g++ -v Reading specs from... (0 Replies)
Discussion started by: lbslbs
0 Replies

9. Shell Programming and Scripting

Solaris install php as an apache module

Hi, I need to install php 5.5.30 as an apache (2.4.17) module on Solaris 10. Please any help is wellcome. Some aditional info: /usr/sfw/bin/gcc -v Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs bash-3.2# g++ -v Reading specs from... (1 Reply)
Discussion started by: lbslbs
1 Replies
HTTP::Request::Common(3pm)				User Contributed Perl Documentation				HTTP::Request::Common(3pm)

NAME
HTTP::Request::Common - Construct common HTTP::Request objects SYNOPSIS
use HTTP::Request::Common; $ua = LWP::UserAgent->new; $ua->request(GET 'http://www.sn.no/'); $ua->request(POST 'http://somewhere/foo', [foo => bar, bar => foo]); DESCRIPTION
This module provide functions that return newly created "HTTP::Request" objects. These functions are usually more convenient to use than the standard "HTTP::Request" constructor for the most common requests. The following functions are provided: GET $url GET $url, Header => Value,... The GET() function returns an "HTTP::Request" object initialized with the "GET" method and the specified URL. It is roughly equivalent to the following call HTTP::Request->new( GET => $url, HTTP::Headers->new(Header => Value,...), ) but is less cluttered. What is different is that a header named "Content" will initialize the content part of the request instead of setting a header field. Note that GET requests should normally not have a content, so this hack makes more sense for the PUT() and POST() functions described below. The get(...) method of "LWP::UserAgent" exists as a shortcut for $ua->request(GET ...). HEAD $url HEAD $url, Header => Value,... Like GET() but the method in the request is "HEAD". The head(...) method of "LWP::UserAgent" exists as a shortcut for $ua->request(HEAD ...). PUT $url PUT $url, Header => Value,... PUT $url, Header => Value,..., Content => $content Like GET() but the method in the request is "PUT". The content of the request can be specified using the "Content" pseudo-header. This steals a bit of the header field namespace as there is no way to directly specify a header that is actually called "Content". If you really need this you must update the request returned in a separate statement. DELETE $url DELETE $url, Header => Value,... Like GET() but the method in the request is "DELETE". This function is not exported by default. POST $url POST $url, Header => Value,... POST $url, $form_ref, Header => Value,... POST $url, Header => Value,..., Content => $form_ref POST $url, Header => Value,..., Content => $content This works mostly like PUT() with "POST" as the method, but this function also takes a second optional array or hash reference parameter $form_ref. As for PUT() the content can also be specified directly using the "Content" pseudo-header, and you may also provide the $form_ref this way. The $form_ref argument can be used to pass key/value pairs for the form content. By default we will initialize a request using the "application/x-www-form-urlencoded" content type. This means that you can emulate an HTML <form> POSTing like this: POST 'http://www.perl.org/survey.cgi', [ name => 'Gisle Aas', email => 'gisle@aas.no', gender => 'M', born => '1964', perc => '3%', ]; This will create an HTTP::Request object that looks like this: POST http://www.perl.org/survey.cgi Content-Length: 66 Content-Type: application/x-www-form-urlencoded name=Gisle%20Aas&email=gisle%40aas.no&gender=M&born=1964&perc=3%25 Multivalued form fields can be specified by either repeating the field name or by passing the value as an array reference. The POST method also supports the "multipart/form-data" content used for Form-based File Upload as specified in RFC 1867. You trigger this content format by specifying a content type of 'form-data' as one of the request headers. If one of the values in the $form_ref is an array reference, then it is treated as a file part specification with the following interpretation: [ $file, $filename, Header => Value... ] [ undef, $filename, Header => Value,..., Content => $content ] The first value in the array ($file) is the name of a file to open. This file will be read and its content placed in the request. The routine will croak if the file can't be opened. Use an "undef" as $file value if you want to specify the content directly with a "Content" header. The $filename is the filename to report in the request. If this value is undefined, then the basename of the $file will be used. You can specify an empty string as $filename if you want to suppress sending the filename when you provide a $file value. If a $file is provided by no "Content-Type" header, then "Content-Type" and "Content-Encoding" will be filled in automatically with the values returned by LWP::MediaTypes::guess_media_type() Sending my ~/.profile to the survey used as example above can be achieved by this: POST 'http://www.perl.org/survey.cgi', Content_Type => 'form-data', Content => [ name => 'Gisle Aas', email => 'gisle@aas.no', gender => 'M', born => '1964', init => ["$ENV{HOME}/.profile"], ] This will create an HTTP::Request object that almost looks this (the boundary and the content of your ~/.profile is likely to be different): POST http://www.perl.org/survey.cgi Content-Length: 388 Content-Type: multipart/form-data; boundary="6G+f" --6G+f Content-Disposition: form-data; name="name" Gisle Aas --6G+f Content-Disposition: form-data; name="email" gisle@aas.no --6G+f Content-Disposition: form-data; name="gender" M --6G+f Content-Disposition: form-data; name="born" 1964 --6G+f Content-Disposition: form-data; name="init"; filename=".profile" Content-Type: text/plain PATH=/local/perl/bin:$PATH export PATH --6G+f-- If you set the $DYNAMIC_FILE_UPLOAD variable (exportable) to some TRUE value, then you get back a request object with a subroutine closure as the content attribute. This subroutine will read the content of any files on demand and return it in suitable chunks. This allow you to upload arbitrary big files without using lots of memory. You can even upload infinite files like /dev/audio if you wish; however, if the file is not a plain file, there will be no Content-Length header defined for the request. Not all servers (or server applications) like this. Also, if the file(s) change in size between the time the Content-Length is calculated and the time that the last chunk is delivered, the subroutine will "Croak". The post(...) method of "LWP::UserAgent" exists as a shortcut for $ua->request(POST ...). SEE ALSO
HTTP::Request, LWP::UserAgent COPYRIGHT
Copyright 1997-2004, Gisle Aas This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-02-16 HTTP::Request::Common(3pm)
All times are GMT -4. The time now is 07:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy