httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prasant...@webdunia.com
Subject [users@httpd] Re:File upload to Apache server (POST)
Date Tue, 02 Dec 2008 11:16:43 GMT
Hello Andre,

First, thank you very much for the reply and the effort.

>>This list is a support list for the Apache httpd server, and people here 
try to accomodate even ultra-beginners with Apache/httpd.
I am an ultra-beginner.  After doing some google search, I had come to the understanding that
there needs to be a program to handle the POST request in the Apache server.  But, still wanted
to confirm with the experts whether it is possible that Apache can handle it.

>>When you are typing "POST" on the command-line, I guess that what you 
are really running, is the POST program that comes with perl, which by 
coincidence is also installed on your system. In any case, it is not a 
program delivered with Apache.
I did not have any presumptions that POST comes with Apache.  I searched for these in the
web on this before posting this query.  I happened to stumble over this program and tried
it.  It gave the same result what we get through a POST request from a client.  So, I thought
people would be familiar with this program and so posted it.

Thanks once again for your help.

Regards,
prasanth.


-------------------------------------------------------------------------------------------
---- Original message ----
From: =?UTF-8?B?QW5kcsOpIFdhcm5pZXI= <aw@ice-sa.com>
To: users@httpd.apache.org
Sent: 01 Dec 2008 20:52:09
Subject: E�z�!��]File upload to Apache server (POST)

Hi.

First I think you need to fix your email program, because it is giving 
some really bizarre stuff in the subject of your emails.

Second, I would recommend that you get some basic training about what 
the HTTP protocol is and does.
This list is a support list for the Apache httpd server, and people here 
try to accomodate even ultra-beginners with Apache/httpd.  But it looks 
like you are not even quite sure about the very basics of the HTTP 
protocol in general, and I believe that it is not really the purpose of 
this list to provide such education.

To give you an idea :
When you are typing "POST" on the command-line, I guess that what you 
are really running, is the POST program that comes with perl, which by 
coincidence is also installed on your system. In any case, it is not a 
program delivered with Apache.
Also, a HTTP POST request indicates, not that you want to load a file to 
the Apache server (that would be a PUT request), but that you are 
sending the content of a form to the server, expecting something on the 
server side to process that.  But there is nothing in a standard Apache 
installation that does process that, you have to write or install that 
separately.
It is the same for the DELETE method.  It is supported by Apache (being 
part of the HTTP protocol), but you also need something on the server 
side to handle it.

This looks like it might be a good place to start :
http://www.jmarshall.com/easy/http/



prasanthgs@webdunia.com wrote:
 Hi All,
 
 First of all, sorry for the long mail.  Gist of the mail is to know how to use the POST method
for Apache server without installing Tomcat or any third party software.
 
 I have a "Server version: Apache/2.0.54" installed in my system.  I have configured it to
act as a server as well as a proxy server; which means the Apache is working fine.
 
 Now I try to do some configuration so that the Apache server will support uploading of files
(i.e. POST method).
 
 For that I created a folder “public” and the configuration in httpd.conf for the same
is as follows:
 
 <Directory "/var/www/html/public"
     AllowOverride None
     Options None
     <Limit POST GET HEAD DELETE
         Order allow,deny
         Allow from all
     </Limit
 </Directory
 
 Then “/etc/init.d/httpd restart”.
 
 Then POST command is executed to create a new file “NotExists.txt” in "/var/www/html/public":
 
 User  :$ POST "http://127.0.0.1/public/NotExists.txt"
 Reply :$ Please enter content (application/x-www-form-urlencoded) to be POSTed:
 User  :$ helloooooooooooooooo
 User  :$ Ctrl D
 Reply :$ <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"
           <html<head
           <title404 Not Found</title
           </head<body
           <h1Not Found</h1
           <pThe requested URL /public/hello.txt was not found on this server.</p
           <hr
           <addressApache/2.0.54 (Fedora) Server at 127.0.0.1 Port 80</address
           </body</html
 
 [
  “User” is the User Input given by the user.
  “Reply” is the reply printed out on to the terminal.
 ]
 
 And in case, the POST is done for a file which already exists in the server, the content
of the file is given back (i.e., it behaves as if a GET request is sent!).
 
 Also, would like to know if the DELETE method is supported by Apache.  If so, what should
be the configuration.
 
 Regards,
 prasanth.
 
 
 India's first Indian Language Mailing System,Now in a New Look and Feel.Open your FREE e-mail
account today!!!
 
 ---------------------------------------------------------------------
 The official User-To-User support forum of the Apache HTTP Server Project.
 See <URL:http://httpd.apache.org/userslist.html for more info.
 To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
    "   from the digest: users-digest-unsubscribe@httpd.apache.org
 For additional commands, e-mail: users-help@httpd.apache.org
 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message