cgi_path.xml.ko revision 5718d2b6ea423b4eb2d45f64bbc4c8eb61e0400f
<?xml version="1.0" encoding="EUC-KR" ?>
<!DOCTYPE manualpage SYSTEM "/style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="/style/manual.ko.xsl"?>
<!-- English Revision: 1.7 -->
<!--
Copyright 2003-2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manualpage metafile="cgi_path.xml.meta">
<title>CGI ȯ�濡�� PATH_INFO�� ��ȭ</title>
<summary>
<p>����ġ 1.1.1�� �� ���� ������ ��� CGI ȯ�濡��
PATH_INFO�� ����� ����� ���������� �ʰ� � ��� ������
���̱⵵ �ߴ�. ����ġ 1.2 ���� �� ����� ���ߴ�. ������
� CGI ���α׷���� �ణ�� ȣȯ������ ������
����ġ 1.2�� �ൿ�� ������ CGI/1.1 �Ծ��� ����������,
���� CGI ��ũ��Ʈ�� ������ �� �ִ�. (<a href="#compat">�Ʒ�
���</a>)</p>
</summary>
<section id="prob"><title>������</title>
<p>����ġ 1.1.1�� �� ���� ������ URL ��� ���ϸ���
������ PATH_INFO�� SCRIPT_NAME ȯ�溯���� �����ߴ�. ����
��� �ùٸ� ��� ������, ���Ͻý��� ��ΰ� path
������ �����Ѵٸ� �߸�� ��� ���� �� �ִ�. ���� ���,
�������Ͽ� ������ ���� ������ �ִٸ�:</p>
<example>
Alias /cgi-ralph /usr/local/httpd/cgi-bin/user.cgi/ralph
</example>
<p>�� ��� <code>user.cgi</code>�� CGI ��ũ��Ʈ�̰�, "/ralph"��
CGI�� �Ѱ����� ������. �� ���
"<code>/cgi-ralph/script/</code>"�� ��û�� ������ PATH��
"<code>/ralph/script</code>"�� �ǰ�, SCRIPT_NAME��
"<code>/cgi-</code>"�� �ȴ�. ���ڴ� �и��� �߸�Ǿ��.
������ � ��� ������ �ױ⵵ �Ѵ�.</p>
</section>
<section id="solution"><title>�ذ�å</title>
<p>����ġ 1.2 ���Ŀ����� URL���� Ŭ���̾�Ʈ�� �������
�κ��� �Ǵ��Ͽ� SCRIPT_NAME�� PATH_INFO�� �����Ѵ�. ����
������ PATH_INFO�� "<code>/script</code>"�� �ǰ�, SCRIPT_NAME��
"<code>/cgi-ralph</code>"�� �ȴ�. �̴� �ո����̸� ������
������ ����Ű�� �ʴ´�. ��, ���� ����� �޸� ��ũ��Ʈ����
"<code>http://$SERVER_NAME:$SERVER_PORT$SCRIPT_NAME$PATH_INFO</code>"��
���� ��ũ��Ʈ�� ����Ű�� URL���� ������ �� �ִ�.</p>
<p>�׷��� �������� <code>Alias</code> ���þ���
"<code>/ralph</code>" ������ ������. �׷��� �츮��
���Ͻý����� ����Ͽ� �̷� ������ �Ѱ��ִ� ���� �ٶ�����
����� �ƴϸ�, �̸� ����ϴ� ��ũ��Ʈ�� �۵���"������"
�ʴٰ� ���Ѵ�. �׷��� ����ġ 1.2b3 ���Ŀ��� �̿� ����
<a href="#compat">�ذ�å</a>�� �ִ�.</p>
</section>
<section id="compat">
<title>���� ������ ȣȯ��</title>
<p>����ġ ���� �����̳� �ٸ� ���������� ����� ��ũ��Ʈ��
���� PATH_INFO ������ �����ߴ� ������ �ʿ��� �� �ִ�. �׷���
����ġ 1.2 (1.2b3 ����)�� FILEPATH_INFO��� ������ �� �����Ѵ�.
�� ȯ�溯���� ����ġ 1.1.1�� PATH_INFO ���� �����.</p>
<p>��ũ��Ʈ�� ����ġ 1.2�� ���� ���� ��ο��� �����ϰ��Ϸ���,
���� FILEPATH_INFO�� �ִ��� �˻��ϰ� �ִٸ� �װ���
����Ѵ�. ��ٸ� PATH_INFO�� ����Ѵ�. ���� ���,
Perl�δ� ������ ����:</p>
<example>
$path_info = $ENV{'FILEPATH_INFO'} || $ENV{'PATH_INFO'};
</example>
<p>�̷��� �ϸ� ��� ����ġ�� �����Ͽ� CGI/1.1 ������ ���
��� �������� ��ũ��Ʈ�� ������ �� �ִ�.</p>
</section>
</manualpage>