Re: Apache httpd question(emergent)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On March 29, 2011 22:01 , "Liu JinGang" <liujg@xxxxxxxxxxxxxx> 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
  mark@xxxxxxxxxxx

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux