|
Home > Archive > Web Servers on Unix and Linux > June 2004 > HTTP Server and Client Programmming Doubts
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
HTTP Server and Client Programmming Doubts
|
|
| James 2004-06-04, 10:59 am |
| Hi,
I am writing a "Process" (Client) which communicates with a "HTTP Server"
In my model, Client sends a number of files to server (HTTP) using HTTP
protocol. I am planning to use the Avl Windows API (like HTTPSendRequestEx..)
When i send a File. I want some executable to execute.
How do i do it using HTTP. I know there is some way of doing it. But I
Dont know how to do it. I would appreciate if some one could explain
with an example. It will be very very helpful.
I am also planning to write a "process" (Client). In which case Server
Resides in Linux Machine. Can I execute an executable in the Linux Machine.
If so, How to configure the HTTP Server. I lost my way while going
through httpd.conf.
Since i am using HTTP for file transfer. Can I place any timeout on the
transfer. ie. If i am not able to send the file to server due to
network problem. i must be able to come out and inform the user of it.
as soon as possible. How to set a time out in HTTP CLient.
Any Help is appreciated.
Thanks,
james
| |
| David Efflandt 2004-06-06, 11:57 pm |
| On 4 Jun 2004 05:52:43 -0700, James <james_sparker@yahoo.co.uk> wrote:
> Hi,
>
> I am writing a "Process" (Client) which communicates with a "HTTP Server"
> In my model, Client sends a number of files to server (HTTP) using HTTP
> protocol. I am planning to use the Avl Windows API (like HTTPSendRequestEx..)
>
> When i send a File. I want some executable to execute.
> How do i do it using HTTP. I know there is some way of doing it. But I
> Dont know how to do it. I would appreciate if some one could explain
> with an example. It will be very very helpful.
I am not familiar with HTTP PUT (apache docs may have info about it), but
I believe that requires a CGI handler on the server. Most common HTTP
file upload method is probably using form file upload field (which can
use multiple fields to upload multiple files at a time if done properly).
The easiest way to create and process forms on apache is probably a Perl
script using CGI module (CGI.pm) running as CGI. However, the filename
passed may include the local path on client machine, so if using the
client's filename to save it, you may need to strip the filename from the
end of any possible included path, and have the script limit destination
paths and check for conflicting filenames (whether filename should be
unique, or overwrite an existing file).
> I am also planning to write a "process" (Client). In which case Server
> Resides in Linux Machine. Can I execute an executable in the Linux Machine.
> If so, How to configure the HTTP Server. I lost my way while going
> through httpd.conf.
Again, I am not sure how HTTP PUT is handled on client end. But PERL LWP
related modules could be used as examples of how to access a web server
(GET) or to POST data (POST requires a Content-length header in bytes in
the HTTP request, since there is no eof marker).
> Since i am using HTTP for file transfer. Can I place any timeout on the
> transfer. ie. If i am not able to send the file to server due to
> network problem. i must be able to come out and inform the user of it.
> as soon as possible. How to set a time out in HTTP CLient.
I believe that would have to be handled on the client end, so the client
would be made aware (or log) if something interrupted the process
(transmission interrupted, or no HTTP response received after file
upload).
While this may not be a complete description, it may at least give you a
starting point and some references (since PERL does use C functions).
--
David Efflandt - All spam ignored http://www.de-srv.com/
|
|
|
|
|