HTTP ������ Apache ������ 2.0

This document refers to the 2.0 version of Apache httpd, which is no longer maintained. Upgrade, and refer to the current version of httpd instead, documented at:
You may follow this link to go to the current version of this document.
���� �������� ��������� ������������� ������������ (handlers) � Apache.
| �������� ����� ������ | �������� ����� ��������� |
|---|---|
���������� �������� ���������� ���������� Apache, ������� ������ ��������� ������� ��� ��������� �������������� �����. ��� �������, ������� ����� ������������� ���� ���������� ����������, ������� ����������� �������� ������ �� ���� �����. ������ ����� ������ ������������ ������������, �� ��������� ���� ������ �������������� �������������� (handled) ��������.
� Apache 1.1 ��������� ����������� ������������ ����������� ����. ���ޣ� ��������� ������ ����� ������������ ������ �� ������ �� �� ����, �� � �� ���������� ������ ��� �� ���������������. ��� �������������� �������� ������� ��������, ��-������ ������, ��� ��� ������� ���������, � ��-������, ��� ��������� ������������� � ������ ��� ���, ��� � ����������. (��. ����� «����� � ����������� ������������»)
����������� ����� ������������ �� ���� ���
���������������� � ������ (��� ������������ � �������
�������) �������, ��� ��� ����� ���� ��������� � �������
��������� Action.
� ����������� ������������ ������� ������� ��������� ����������
�����������:
default_handler(), ������� �������� ������������
��-��������� ��� ����������� ������. (����)mod_asis)mod_cgi)mod_imap)mod_info)mod_status)mod_negotiation)��� ������������� ��������� ��������, ������ ������ �����
� ����������� html ����� ��������� �� ����������
CGI-������ footer.pl ��� ��������������� ���������
�������������� �����.
Action add-footer /cgi-bin/footer.pl
AddHandler add-footer .html
� ���� ������� CGI-������ ������������ �� ��, �����
������� ������������ ����������� �������� (�� ������� ���������
���������� ��������� PATH_TRANSLATED), ������
� � �������������� ��� ����������� ���������.
��������� ��������� �������� �������� ����������� ����������
send-as-is, ������� ������������ ��� ������, ����������
���� ����������� HTTP-���������. ��� ����� � ��������
/web/htdocs/asis/ ����� �������������� ������������
send-as-is, ���������� �� �� ����������.
<Directory /web/htdocs/asis>
SetHandler send-as-is
</Directory>
��� ���� ����� ����� ���� ������������ �����������, �
Apache API ���� �������
��������� ����������. � ���������, � ��������� request_rec
���� ��������� ����� ����:
char *handler
���� �� ������ � ��ϣ� ������ ������������ ����������,
�� �ӣ, ��� ��� ���� �������, ��� �������� � r->handler
��� ���������������� �����������, ���ޣ� ������� ��� ����������
����� ���, ��� ������ ������� �� ������ invoke_handler.
����������� ����������� ����� ��� ��, ��� � ������,
�� ����������� ���� ����, ��� ������ ���������� ���������
��� �����������, � �� ��� ����������� (content type).
���� ��� � �� �������� ������������, �� ���������� ���������
������� ���������� ������������ - ���������� ������������
�����, �����̣���� ������� � �� ���������� ����� ���� - ���
�������� �� ������������ � ������������� �ͣ� �����-����� (media type).