On March 29, 2011 22:01 , "Liu JinGang" <li...@cn.fujitsu.com> wrote:
As Eric and Mark said, do you have the document or web-link file
explain this viewpoint?( Apache doesn't discriminate the http methods
to access CGI.)
I do not know of any document that explains the viewpoint. However, you
can observe and test that Apache does not discriminate.
Also, Apache *will* discriminate if you use the Limit and LimitExcept
directives. So you can have either behavior. Since you can have either
behavior, I hope a document is not necessary.
I apologize if I do not understand the question.
Then my mail said that:
*> And then if I access the HTML file of "/opt/web/htroot" , the
result as following:*
*> The GET, HEAD, OPTIONS can access the HTML file. I don't set the *
*> limits except TRACE. This is the default ?*
Why?
The default is that all methods are accepted. The purpose of Apache is
to serve web content in reponse to HTTP requests. So when Apache
receives an HTTP request, it tries to serve the content, unless you tell
Apache not to serve the content or unless there is some problem with the
request.
Your list of methods (above) is not complete. With the configuration
from your first email message, other methods will also be accepted for
accessing the HTML file. For example, the POST method will be accepted
to access the HTML file. I can use the "curl" program to send a POST
request for /index.html on my web server:
curl --data foo=1 --data bar=2 http://f14dev1.catseye.org/index.html
When I run the above command, the request is sucessful, even though this
is just a static HTML file (no CGI):
2011-03-30T06:40:37.984640-0400 - 172.16.168.128:42060 -
f14dev1.catseye.org:80 "POST /index.html HTTP/1.1" +200/200 876us
265/475/729 pid=1459 "curl/7.21.0 (x86_64-redhat-linux-gnu)
libcurl/7.21.0 NSS/3.12.8.0 zlib/1.2.5 libidn/1.18 libssh2/1.2.4" "-"
(I use a special LogFormat directive, so the log line above is not the
default one that Apache usually uses. But hopefully it is
understandable: "172.16.168.128 contacts f14dev1.catseye.org and makes
the request 'POST /index.html' which succeeds with HTTP status code 200")
I hope this helps. Please let me know if I am answering the wrong
questions.
--
Mark Montague
m...@catseye.org