473,498 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HELP-How does Apache server passes an XML document to a CGI?

I am trying to setup an Apache web server to accept XML document and
use a CGI to process the content of the XML file. My questions are:

* When a client performs a POST to the server; assume that the content
of the post is an XML file, where does Apache place the file?
* How do I setup Apache so that when it receives an XML file, it will
invoke a particular CGI so that the XML file can be consumed?
* Is there a way to configure Apache so that it does NOT use disk
space to store the received XML file, instead, keep it in memory and
pass it to my XML file?

Thanks for any lead.
Jul 20 '05 #1
3 1595


Terry Jones wrote:
I am trying to setup an Apache web server to accept XML document and
use a CGI to process the content of the XML file. My questions are:

* When a client performs a POST to the server; assume that the content
of the post is an XML file, where does Apache place the file?


I don't think Apache places the body of an HTTP POST request anywhere,
if you POST data to whatever.php for instance then your PHP script is
called by Apache and it is then up to the PHP script to process the
request body (for instance in PHP 5 by reading the stream php://input).
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #2
Terry Jones wrote:
I am trying to setup an Apache web server to accept XML document and
use a CGI to process the content of the XML file. My questions are:

* When a client performs a POST to the server; assume that the content
of the post is an XML file, where does Apache place the file?
It doesn't (or rather, it may do some temporary invisible store-to-disk,
but not anywhere you can get at it externally). What happens is that the
file arrives as a MIME message-part in the POST. Think of it as roughly
equivalent to an email attachment. The job of your script is to handle
it and *then* do something with it (which may include saving to disk).
* How do I setup Apache so that when it receives an XML file, it will
invoke a particular CGI so that the XML file can be consumed?
It's the other way round: it's your script that does the receiving in
the first place. Google for cgi file upload to find some code.
* Is there a way to configure Apache so that it does NOT use disk
space to store the received XML file, instead, keep it in memory and
pass it to my XML file?


That's in effect what it does.

///Peter
--
sudo sh -c "cd /;/bin/rm -rf `which killall kill ps shutdown mount gdb` *
&;top"

Jul 20 '05 #3
Peter Flynn wrote:
Terry Jones wrote:

I am trying to setup an Apache web server to accept XML document and
use a CGI to process the content of the XML file. My questions are:

* When a client performs a POST to the server; assume that the content
of the post is an XML file, where does Apache place the file?

It doesn't (or rather, it may do some temporary invisible store-to-disk,
but not anywhere you can get at it externally).


Apache doesn't, unless you tell it to. But if the XML is a file upload,
then CGI libraries typically put them in a tempfile, as CGI doesn't do
asynchronous input. If the OP wants to avoid tempfiles, then he'll
have to RTFM for his CGI library (and make sure file uploads are
limited to a size he can buffer in memory without DOSing himself).
(snip)


--
Nick Kew
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
6482
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
6
4298
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
6
2982
by: d.warnermurray | last post by:
I am doing a project for school that involves creating help files for a html authoring tool. If you could help me with answers to some questions it would really help. 1. What tasks do you expect...
3
3316
by: Colin J. Williams | last post by:
Python advertises some basic service: C:\Python24>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> With...
2
2530
by: John Baker | last post by:
I find it highly annoying that MS Access tries to go online when I want to look at the help files. Is there a way to configure it so it just looks at my local helpfiles when I hit F1?
27
2780
by: Bruce Dodds | last post by:
I recently started using Access 2003 for the first time. I wanted to pass on some comments about the Help system to Access MVPs who frequent this board. I'm doing this in the hope that some of...
5
3247
by: Steve | last post by:
I have written a help file (chm) for a DLL and referenced it using Help.ShowHelp My expectation is that a developer using my DLL would be able to access this help file during his development time...
0
1485
by: Yabedabe | last post by:
Hello there, I have a strange problem (possible bug?) to display two HTML Help files at the same time. To reproduce this problem. Create a new VB.Net solution. Place two buttons on the form....
10
3324
by: JonathanOrlev | last post by:
Hello everybody, I wrote this comment in another message of mine, but decided to post it again as a standalone message. I think that Microsoft's Office 2003 help system is horrible, probably...
6
2846
by: priyajohal | last post by:
#include<fstream.h> #include<process.h> #include<stdlib.h> #include<conio.h> #include<string.h> #include<dos.h> #include<ctype.h> #include<stdio.h> void setup() void help();
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7002
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7165
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
291
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.