fix accumulated whitespace and indentation damage
This commit is contained in:
parent
e84aeb5bcb
commit
c86e052b81
@ -2019,7 +2019,7 @@ static
|
|||||||
USE_DESKTOP(long long) int pack_gzip(void)
|
USE_DESKTOP(long long) int pack_gzip(void)
|
||||||
{
|
{
|
||||||
struct stat s;
|
struct stat s;
|
||||||
|
|
||||||
clear_bufs();
|
clear_bufs();
|
||||||
s.st_ctime = 0;
|
s.st_ctime = 0;
|
||||||
fstat(STDIN_FILENO, &s);
|
fstat(STDIN_FILENO, &s);
|
||||||
|
@ -51,7 +51,7 @@ int cp_main(int argc, char **argv)
|
|||||||
if (flags & OPT_H) ... // deref command-line params only
|
if (flags & OPT_H) ... // deref command-line params only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if ENABLE_SELINUX
|
#if ENABLE_SELINUX
|
||||||
if (flags & FILEUTILS_PRESERVE_SECURITY_CONTEXT) {
|
if (flags & FILEUTILS_PRESERVE_SECURITY_CONTEXT) {
|
||||||
selinux_or_die();
|
selinux_or_die();
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ int id_main(int argc, char **argv)
|
|||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
short status;
|
short status;
|
||||||
#if ENABLE_SELINUX
|
#if ENABLE_SELINUX
|
||||||
security_context_t scontext;
|
security_context_t scontext;
|
||||||
#endif
|
#endif
|
||||||
/* Don't allow -n -r -nr -ug -rug -nug -rnug */
|
/* Don't allow -n -r -nr -ug -rug -nug -rnug */
|
||||||
/* Don't allow more than one username */
|
/* Don't allow more than one username */
|
||||||
@ -78,26 +78,26 @@ int id_main(int argc, char **argv)
|
|||||||
puts((flags & JUST_USER) ? bb_getpwuid(NULL, uid, -1 ) : bb_getgrgid(NULL, gid, -1 ));
|
puts((flags & JUST_USER) ? bb_getpwuid(NULL, uid, -1 ) : bb_getgrgid(NULL, gid, -1 ));
|
||||||
} else {
|
} else {
|
||||||
if (flags & JUST_USER) {
|
if (flags & JUST_USER) {
|
||||||
printf("%u\n", uid);
|
printf("%u\n", uid);
|
||||||
}
|
}
|
||||||
if (flags & JUST_GROUP) {
|
if (flags & JUST_GROUP) {
|
||||||
printf("%u\n", gid);
|
printf("%u\n", gid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLE_SELINUX
|
#if ENABLE_SELINUX
|
||||||
if (flags & JUST_CONTEXT) {
|
if (flags & JUST_CONTEXT) {
|
||||||
selinux_or_die();
|
selinux_or_die();
|
||||||
if (argc - optind == 1) {
|
if (argc - optind == 1) {
|
||||||
bb_error_msg_and_die("user name can't be passed with -Z");
|
bb_error_msg_and_die("user name can't be passed with -Z");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getcon(&scontext)) {
|
if (getcon(&scontext)) {
|
||||||
bb_error_msg_and_die("can't get process context");
|
bb_error_msg_and_die("can't get process context");
|
||||||
}
|
}
|
||||||
printf("%s\n", scontext);
|
printf("%s\n", scontext);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* exit */
|
/* exit */
|
||||||
fflush_stdout_and_exit(EXIT_SUCCESS);
|
fflush_stdout_and_exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ static void setdefaultfilecon(const char *path) {
|
|||||||
|
|
||||||
if (!is_selinux_enabled()) {
|
if (!is_selinux_enabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (lstat(path, &s) != 0) {
|
if (lstat(path, &s) != 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -101,7 +101,7 @@ int install_main(int argc, char **argv)
|
|||||||
/* -c exists for backwards compatibility, it's needed */
|
/* -c exists for backwards compatibility, it's needed */
|
||||||
|
|
||||||
flags = getopt32(argc, argv, "cdpsg:m:o:" USE_SELINUX("Z:"), &gid_str, &mode_str, &uid_str USE_SELINUX(, &scontext));
|
flags = getopt32(argc, argv, "cdpsg:m:o:" USE_SELINUX("Z:"), &gid_str, &mode_str, &uid_str USE_SELINUX(, &scontext));
|
||||||
|
|
||||||
#if ENABLE_SELINUX
|
#if ENABLE_SELINUX
|
||||||
if (flags & OPT_PRESERVE_SECURITY_CONTEXT) {
|
if (flags & OPT_PRESERVE_SECURITY_CONTEXT) {
|
||||||
use_default_selinux_context = 0;
|
use_default_selinux_context = 0;
|
||||||
|
@ -770,7 +770,7 @@ static const unsigned opt_flags[] = {
|
|||||||
#if ENABLE_FEATURE_AUTOWIDTH
|
#if ENABLE_FEATURE_AUTOWIDTH
|
||||||
0, 0, /* T, w - ignored */
|
0, 0, /* T, w - ignored */
|
||||||
#endif
|
#endif
|
||||||
#if ENABLE_SELINUX
|
#if ENABLE_SELINUX
|
||||||
LIST_MODEBITS|LIST_ID_NAME|LIST_CONTEXT, /* Z */
|
LIST_MODEBITS|LIST_ID_NAME|LIST_CONTEXT, /* Z */
|
||||||
#endif
|
#endif
|
||||||
(1U<<31)
|
(1U<<31)
|
||||||
|
@ -118,7 +118,7 @@ DO_MOVE:
|
|||||||
copy_flag = FILEUTILS_RECUR | FILEUTILS_PRESERVE_STATUS;
|
copy_flag = FILEUTILS_RECUR | FILEUTILS_PRESERVE_STATUS;
|
||||||
#if ENABLE_SELINUX
|
#if ENABLE_SELINUX
|
||||||
copy_flag |= FILEUTILS_PRESERVE_SECURITY_CONTEXT;
|
copy_flag |= FILEUTILS_PRESERVE_SECURITY_CONTEXT;
|
||||||
#endif
|
#endif
|
||||||
if ((copy_file(*argv, dest, copy_flag) >= 0) &&
|
if ((copy_file(*argv, dest, copy_flag) >= 0) &&
|
||||||
(remove_file(*argv, FILEUTILS_RECUR | FILEUTILS_FORCE) >= 0)) {
|
(remove_file(*argv, FILEUTILS_RECUR | FILEUTILS_FORCE) >= 0)) {
|
||||||
goto RET_0;
|
goto RET_0;
|
||||||
|
@ -416,7 +416,7 @@ static int do_statfs(char const *filename, char const *format)
|
|||||||
format = (flags & OPT_TERSE
|
format = (flags & OPT_TERSE
|
||||||
? (flags & OPT_SELINUX ? "%n %i %l %t %s %b %f %a %c %d %C\n":
|
? (flags & OPT_SELINUX ? "%n %i %l %t %s %b %f %a %c %d %C\n":
|
||||||
"%n %i %l %t %s %b %f %a %c %d\n")
|
"%n %i %l %t %s %b %f %a %c %d\n")
|
||||||
: (flags & OPT_SELINUX ?
|
: (flags & OPT_SELINUX ?
|
||||||
" File: \"%n\"\n"
|
" File: \"%n\"\n"
|
||||||
" ID: %-8i Namelen: %-7l Type: %T\n"
|
" ID: %-8i Namelen: %-7l Type: %T\n"
|
||||||
"Block size: %-10s\n"
|
"Block size: %-10s\n"
|
||||||
@ -531,7 +531,7 @@ static int do_stat(char const *filename, char const *format)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (flags & OPT_TERSE) {
|
if (flags & OPT_TERSE) {
|
||||||
format = (flags & OPT_SELINUX ?
|
format = (flags & OPT_SELINUX ?
|
||||||
"%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o %C\n":
|
"%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o %C\n":
|
||||||
"%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o\n");
|
"%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o\n");
|
||||||
} else {
|
} else {
|
||||||
|
@ -16,7 +16,7 @@ The following environment variables are not request-specific and are
|
|||||||
set for all requests: </p><p>
|
set for all requests: </p><p>
|
||||||
|
|
||||||
</p><ul>
|
</p><ul>
|
||||||
<li> <code>SERVER_SOFTWARE</code> <p>
|
<li> <code>SERVER_SOFTWARE</code> <p>
|
||||||
|
|
||||||
The name and version of the information server software answering
|
The name and version of the information server software answering
|
||||||
the request (and running the gateway). Format: name/version </p><p>
|
the request (and running the gateway). Format: name/version </p><p>
|
||||||
@ -25,7 +25,7 @@ set for all requests: </p><p>
|
|||||||
The server's hostname, DNS alias, or IP address as it would appear
|
The server's hostname, DNS alias, or IP address as it would appear
|
||||||
in self-referencing URLs. </p><p>
|
in self-referencing URLs. </p><p>
|
||||||
|
|
||||||
</p></li><li> <code>GATEWAY_INTERFACE</code> <p>
|
</p></li><li> <code>GATEWAY_INTERFACE</code> <p>
|
||||||
The revision of the CGI specification to which this server
|
The revision of the CGI specification to which this server
|
||||||
complies. Format: CGI/revision</p><p>
|
complies. Format: CGI/revision</p><p>
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ fulfilled by the gateway program: <p>
|
|||||||
The method with which the request was made. For HTTP, this is
|
The method with which the request was made. For HTTP, this is
|
||||||
"GET", "HEAD", "POST", etc. </p><p>
|
"GET", "HEAD", "POST", etc. </p><p>
|
||||||
|
|
||||||
</p></li><li> <code>PATH_INFO</code> <p>
|
</p></li><li> <code>PATH_INFO</code> <p>
|
||||||
The extra path information, as given by the client. In other
|
The extra path information, as given by the client. In other
|
||||||
words, scripts can be accessed by their virtual pathname, followed
|
words, scripts can be accessed by their virtual pathname, followed
|
||||||
by extra information at the end of this path. The extra
|
by extra information at the end of this path. The extra
|
||||||
@ -64,7 +64,7 @@ fulfilled by the gateway program: <p>
|
|||||||
A virtual path to the script being executed, used for
|
A virtual path to the script being executed, used for
|
||||||
self-referencing URLs. </p><p>
|
self-referencing URLs. </p><p>
|
||||||
|
|
||||||
</p></li><li> <a name="query"><code>QUERY_STRING</code></a> <p>
|
</p></li><li> <a name="query"><code>QUERY_STRING</code></a> <p>
|
||||||
The information which follows the ? in the <a href="http://www.ncsa.uiuc.edu/demoweb/url-primer.html">URL</a>
|
The information which follows the ? in the <a href="http://www.ncsa.uiuc.edu/demoweb/url-primer.html">URL</a>
|
||||||
which referenced this script. This is the query information. It
|
which referenced this script. This is the query information. It
|
||||||
should not be decoded in any fashion. This variable should always
|
should not be decoded in any fashion. This variable should always
|
||||||
@ -82,7 +82,7 @@ fulfilled by the gateway program: <p>
|
|||||||
protects, this is the protocol-specific authentication method used
|
protects, this is the protocol-specific authentication method used
|
||||||
to validate the user. </p><p>
|
to validate the user. </p><p>
|
||||||
|
|
||||||
</p></li><li> <code>REMOTE_USER</code> <p>
|
</p></li><li> <code>REMOTE_USER</code> <p>
|
||||||
If the server supports user authentication, and the script is
|
If the server supports user authentication, and the script is
|
||||||
protected, this is the username they have authenticated as. </p><p>
|
protected, this is the username they have authenticated as. </p><p>
|
||||||
</p></li><li> <code>REMOTE_IDENT</code> <p>
|
</p></li><li> <code>REMOTE_IDENT</code> <p>
|
||||||
|
@ -12,7 +12,7 @@ The server and the CGI script communicate in four major ways. Each of
|
|||||||
the following is a hotlink to graphic detail.</p><p>
|
the following is a hotlink to graphic detail.</p><p>
|
||||||
|
|
||||||
</p><ul>
|
</p><ul>
|
||||||
<li> <a href="env.html">Environment variables</a>
|
<li> <a href="env.html">Environment variables</a>
|
||||||
</li><li> <a href="cl.html">The command line</a>
|
</li><li> <a href="cl.html">The command line</a>
|
||||||
</li><li> <a href="in.html">Standard input</a>
|
</li><li> <a href="in.html">Standard input</a>
|
||||||
</li><li> <a href="out.html">Standard output</a>
|
</li><li> <a href="out.html">Standard output</a>
|
||||||
|
@ -123,7 +123,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
Discussion of this draft occurs on the CGI-WG mailing list; see the
|
Discussion of this draft occurs on the CGI-WG mailing list; see the
|
||||||
project Web page at
|
project Web page at
|
||||||
<SAMP><URL:<A HREF="http://CGI-Spec.Golux.Com/"
|
<SAMP><URL:<A HREF="http://CGI-Spec.Golux.Com/"
|
||||||
>http://CGI-Spec.Golux.Com/</A>></SAMP>
|
>http://CGI-Spec.Golux.Com/</A>></SAMP>
|
||||||
for details on the mailing list and the status of the project.
|
for details on the mailing list and the status of the project.
|
||||||
@ -410,17 +410,17 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
</H3>
|
</H3>
|
||||||
<P>
|
<P>
|
||||||
Together the HTTP [<A HREF="#[3]">3</A>,<A HREF="#[8]">8</A>] server
|
Together the HTTP [<A HREF="#[3]">3</A>,<A HREF="#[8]">8</A>] server
|
||||||
and the CGI script are responsible
|
and the CGI script are responsible
|
||||||
for servicing a client
|
for servicing a client
|
||||||
request by sending back responses. The client
|
request by sending back responses. The client
|
||||||
request comprises a Universal Resource Identifier (URI)
|
request comprises a Universal Resource Identifier (URI)
|
||||||
[<A HREF="#[1]">1</A>], a
|
[<A HREF="#[1]">1</A>], a
|
||||||
request method, and various ancillary
|
request method, and various ancillary
|
||||||
information about the request
|
information about the request
|
||||||
provided by the transport mechanism.
|
provided by the transport mechanism.
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
The CGI defines the abstract parameters, known as
|
The CGI defines the abstract parameters, known as
|
||||||
metavariables,
|
metavariables,
|
||||||
which describe the client's
|
which describe the client's
|
||||||
request. Together with a
|
request. Together with a
|
||||||
@ -435,7 +435,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
</H3>
|
</H3>
|
||||||
<P>
|
<P>
|
||||||
This specification uses the same words as RFC 1123
|
This specification uses the same words as RFC 1123
|
||||||
[<A HREF="#[5]">5</A>] to define the
|
[<A HREF="#[5]">5</A>] to define the
|
||||||
significance of each particular requirement. These are:
|
significance of each particular requirement. These are:
|
||||||
</P><!--#if expr="! $GUI" -->
|
</P><!--#if expr="! $GUI" -->
|
||||||
<P></P><!--#endif -->
|
<P></P><!--#endif -->
|
||||||
@ -478,7 +478,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
all of the 'should' requirements for its features is said to be
|
all of the 'should' requirements for its features is said to be
|
||||||
'conditionally compliant.'
|
'conditionally compliant.'
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H3>
|
<H3>
|
||||||
<A NAME="1.3">
|
<A NAME="1.3">
|
||||||
1.3. Specifications
|
1.3. Specifications
|
||||||
@ -514,7 +514,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
</P>
|
</P>
|
||||||
</DD>
|
</DD>
|
||||||
</DL>
|
</DL>
|
||||||
|
|
||||||
<H3>
|
<H3>
|
||||||
<A NAME="1.4">
|
<A NAME="1.4">
|
||||||
1.4. Terminology
|
1.4. Terminology
|
||||||
@ -523,11 +523,11 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
<P>
|
<P>
|
||||||
This specification uses many terms defined in the HTTP/1.1
|
This specification uses many terms defined in the HTTP/1.1
|
||||||
specification [<A HREF="#[8]">8</A>]; however, the following terms are
|
specification [<A HREF="#[8]">8</A>]; however, the following terms are
|
||||||
used here in a
|
used here in a
|
||||||
sense which may not accord with their definitions in that document,
|
sense which may not accord with their definitions in that document,
|
||||||
or with their common meaning.
|
or with their common meaning.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<DL>
|
<DL>
|
||||||
<DT><EM>metavariable</EM>
|
<DT><EM>metavariable</EM>
|
||||||
</DT>
|
</DT>
|
||||||
@ -538,13 +538,13 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
environment, although that is the most common implementation.
|
environment, although that is the most common implementation.
|
||||||
</P>
|
</P>
|
||||||
</DD>
|
</DD>
|
||||||
|
|
||||||
<DT><EM>script</EM>
|
<DT><EM>script</EM>
|
||||||
</DT>
|
</DT>
|
||||||
<DD>
|
<DD>
|
||||||
<P>
|
<P>
|
||||||
The software which is invoked by the server <EM>via</EM> this
|
The software which is invoked by the server <EM>via</EM> this
|
||||||
interface. It
|
interface. It
|
||||||
need not be a standalone program, but could be a
|
need not be a standalone program, but could be a
|
||||||
dynamically-loaded or shared library, or even a subroutine in the
|
dynamically-loaded or shared library, or even a subroutine in the
|
||||||
server. It <EM>may</EM> be a set of statements
|
server. It <EM>may</EM> be a set of statements
|
||||||
@ -562,7 +562,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
</P>
|
</P>
|
||||||
</DD>
|
</DD>
|
||||||
</DL>
|
</DL>
|
||||||
|
|
||||||
<H2>
|
<H2>
|
||||||
<A NAME="2.0">
|
<A NAME="2.0">
|
||||||
2. Notational Conventions and Generic Grammar
|
2. Notational Conventions and Generic Grammar
|
||||||
@ -632,7 +632,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
</P>
|
</P>
|
||||||
</DD>
|
</DD>
|
||||||
</DL>
|
</DL>
|
||||||
|
|
||||||
<H3>
|
<H3>
|
||||||
<A NAME="2.2">
|
<A NAME="2.2">
|
||||||
2.2. Basic Rules
|
2.2. Basic Rules
|
||||||
@ -687,7 +687,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
Note that newline (NL) need not be a single character, but can be a
|
Note that newline (NL) need not be a single character, but can be a
|
||||||
character sequence.
|
character sequence.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H2>
|
<H2>
|
||||||
<A NAME="3.0">
|
<A NAME="3.0">
|
||||||
3. Protocol Parameters
|
3. Protocol Parameters
|
||||||
@ -730,7 +730,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
2396 [<A HREF="#[4]">4</A>]
|
2396 [<A HREF="#[4]">4</A>]
|
||||||
for authoritative treatment of this issue.
|
for authoritative treatment of this issue.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H3>
|
<H3>
|
||||||
<A NAME="3.2">
|
<A NAME="3.2">
|
||||||
3.2. The Script-URI
|
3.2. The Script-URI
|
||||||
@ -739,7 +739,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
<P>
|
<P>
|
||||||
The 'Script-URI' is defined as the URI of the resource identified
|
The 'Script-URI' is defined as the URI of the resource identified
|
||||||
by the metavariables. Often,
|
by the metavariables. Often,
|
||||||
this URI will be the same as
|
this URI will be the same as
|
||||||
the URI requested by the client (the 'Client-URI'); however, it need
|
the URI requested by the client (the 'Client-URI'); however, it need
|
||||||
not be. Instead, it could be a URI invented by the server, and so it
|
not be. Instead, it could be a URI invented by the server, and so it
|
||||||
can only be used in the context of the server and its CGI interface.
|
can only be used in the context of the server and its CGI interface.
|
||||||
@ -747,7 +747,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
<P>
|
<P>
|
||||||
The Script-URI has the syntax of generic-RL as defined in section 2.1
|
The Script-URI has the syntax of generic-RL as defined in section 2.1
|
||||||
of RFC 1808 [<A HREF="#[7]">7</A>], with the exception that object
|
of RFC 1808 [<A HREF="#[7]">7</A>], with the exception that object
|
||||||
parameters and
|
parameters and
|
||||||
fragment identifiers are not permitted:
|
fragment identifiers are not permitted:
|
||||||
</P><!--#if expr="! $GUI" -->
|
</P><!--#if expr="! $GUI" -->
|
||||||
<P></P><!--#endif -->
|
<P></P><!--#endif -->
|
||||||
@ -783,7 +783,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
for the script to reconstruct this, and therefore
|
for the script to reconstruct this, and therefore
|
||||||
the Script-URI includes the base protocol used.
|
the Script-URI includes the base protocol used.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H2>
|
<H2>
|
||||||
<A NAME="4.0">
|
<A NAME="4.0">
|
||||||
4. Invoking the Script
|
4. Invoking the Script
|
||||||
@ -795,7 +795,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
otherwise, the file containing the script will be invoked as an
|
otherwise, the file containing the script will be invoked as an
|
||||||
executable program.
|
executable program.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H2>
|
<H2>
|
||||||
<A NAME="5.0">
|
<A NAME="5.0">
|
||||||
5. The CGI Script Command Line
|
5. The CGI Script Command Line
|
||||||
@ -807,7 +807,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
This is identified by a "GET" or "HEAD" HTTP request with a URL
|
This is identified by a "GET" or "HEAD" HTTP request with a URL
|
||||||
query
|
query
|
||||||
string not containing any unencoded "=" characters. For such a
|
string not containing any unencoded "=" characters. For such a
|
||||||
request,
|
request,
|
||||||
servers SHOULD parse the search string
|
servers SHOULD parse the search string
|
||||||
into words, using the following rules:
|
into words, using the following rules:
|
||||||
</P><!--#if expr="! $GUI" -->
|
</P><!--#if expr="! $GUI" -->
|
||||||
@ -862,12 +862,12 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
<P>
|
<P>
|
||||||
Each CGI server
|
Each CGI server
|
||||||
implementation MUST define a mechanism
|
implementation MUST define a mechanism
|
||||||
to pass data about the request from
|
to pass data about the request from
|
||||||
the server to the script.
|
the server to the script.
|
||||||
The metavariables containing these
|
The metavariables containing these
|
||||||
data
|
data
|
||||||
are accessed by the script in a system
|
are accessed by the script in a system
|
||||||
defined manner.
|
defined manner.
|
||||||
The
|
The
|
||||||
representation of the characters in the
|
representation of the characters in the
|
||||||
metavariables is
|
metavariables is
|
||||||
@ -935,7 +935,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
</A>
|
</A>
|
||||||
</H4>
|
</H4>
|
||||||
<P>
|
<P>
|
||||||
This variable is specific to requests made
|
This variable is specific to requests made
|
||||||
<EM>via</EM> the
|
<EM>via</EM> the
|
||||||
"<CODE>http</CODE>"
|
"<CODE>http</CODE>"
|
||||||
scheme.
|
scheme.
|
||||||
@ -943,10 +943,10 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
<P>
|
<P>
|
||||||
If the Script-URI
|
If the Script-URI
|
||||||
required access authentication for external
|
required access authentication for external
|
||||||
access, then the server
|
access, then the server
|
||||||
MUST set
|
MUST set
|
||||||
the value of
|
the value of
|
||||||
this variable
|
this variable
|
||||||
from the '<SAMP>auth-scheme</SAMP>' token in
|
from the '<SAMP>auth-scheme</SAMP>' token in
|
||||||
the request's "<SAMP>Authorization</SAMP>" header
|
the request's "<SAMP>Authorization</SAMP>" header
|
||||||
field.
|
field.
|
||||||
@ -962,7 +962,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
<P>
|
<P>
|
||||||
HTTP access authentication schemes are described in section 11 of the
|
HTTP access authentication schemes are described in section 11 of the
|
||||||
HTTP/1.1 specification [<A HREF="#[8]">8</A>]. The auth-scheme is
|
HTTP/1.1 specification [<A HREF="#[8]">8</A>]. The auth-scheme is
|
||||||
not case-sensitive.
|
not case-sensitive.
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
Servers
|
Servers
|
||||||
@ -1018,7 +1018,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
entity if the type was provided <EM>via</EM>
|
entity if the type was provided <EM>via</EM>
|
||||||
a "<SAMP>Content-type</SAMP>" field in the
|
a "<SAMP>Content-type</SAMP>" field in the
|
||||||
request header, or if the server can determine it in the absence
|
request header, or if the server can determine it in the absence
|
||||||
of a supplied "<SAMP>Content-type</SAMP>" field. The syntax is the
|
of a supplied "<SAMP>Content-type</SAMP>" field. The syntax is the
|
||||||
same as for the HTTP
|
same as for the HTTP
|
||||||
"<SAMP>Content-Type</SAMP>" header field.
|
"<SAMP>Content-Type</SAMP>" header field.
|
||||||
</P><!--#if expr="! $GUI" -->
|
</P><!--#if expr="! $GUI" -->
|
||||||
@ -1053,7 +1053,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
the data received. If the type remains unknown, then
|
the data received. If the type remains unknown, then
|
||||||
the script MAY choose to either assume a
|
the script MAY choose to either assume a
|
||||||
content-type of
|
content-type of
|
||||||
<SAMP>application/octet-stream</SAMP>
|
<SAMP>application/octet-stream</SAMP>
|
||||||
or reject the request with a 415 ("Unsupported Media Type")
|
or reject the request with a 415 ("Unsupported Media Type")
|
||||||
error. See <A HREF="#7.2.1.3">section 7.2.1.3</A>
|
error. See <A HREF="#7.2.1.3">section 7.2.1.3</A>
|
||||||
for more information about returning error status values.
|
for more information about returning error status values.
|
||||||
@ -1091,7 +1091,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
</PRE>
|
</PRE>
|
||||||
<P>
|
<P>
|
||||||
Note that the major and minor numbers are treated as separate
|
Note that the major and minor numbers are treated as separate
|
||||||
integers and hence each may be
|
integers and hence each may be
|
||||||
more than a single
|
more than a single
|
||||||
digit. Thus CGI/2.4 is a lower version than CGI/2.13 which in turn
|
digit. Thus CGI/2.4 is a lower version than CGI/2.13 which in turn
|
||||||
is lower than CGI/12.3. Leading zeros in either
|
is lower than CGI/12.3. Leading zeros in either
|
||||||
@ -1114,10 +1114,10 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
</H4>
|
</H4>
|
||||||
<P>
|
<P>
|
||||||
These metavariables are specific to
|
These metavariables are specific to
|
||||||
the protocol
|
the protocol
|
||||||
<EM>via</EM> which the request is made.
|
<EM>via</EM> which the request is made.
|
||||||
Interpretation of these variables depends on the value of
|
Interpretation of these variables depends on the value of
|
||||||
the
|
the
|
||||||
SERVER_PROTOCOL
|
SERVER_PROTOCOL
|
||||||
metavariable
|
metavariable
|
||||||
(see
|
(see
|
||||||
@ -1158,7 +1158,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
the request
|
the request
|
||||||
header fields that they
|
header fields that they
|
||||||
receive. In particular,
|
receive. In particular,
|
||||||
they MAY
|
they MAY
|
||||||
decline to make available any
|
decline to make available any
|
||||||
header fields carrying authentication information, such as
|
header fields carrying authentication information, such as
|
||||||
"<SAMP>Authorization</SAMP>", or
|
"<SAMP>Authorization</SAMP>", or
|
||||||
@ -1188,7 +1188,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
(defined in
|
(defined in
|
||||||
RFC 2396
|
RFC 2396
|
||||||
[<A HREF="#[4]">4</A>]), with the exception
|
[<A HREF="#[4]">4</A>]), with the exception
|
||||||
that a PATH_INFO of "/"
|
that a PATH_INFO of "/"
|
||||||
represents a single void path segment.
|
represents a single void path segment.
|
||||||
</P><!--#if expr="! $GUI" -->
|
</P><!--#if expr="! $GUI" -->
|
||||||
<P></P><!--#endif -->
|
<P></P><!--#endif -->
|
||||||
@ -1202,7 +1202,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
The PATH_INFO string is the trailing part of the <path> component of
|
The PATH_INFO string is the trailing part of the <path> component of
|
||||||
the Script-URI
|
the Script-URI
|
||||||
(see <A HREF="#3.2">section 3.2</A>)
|
(see <A HREF="#3.2">section 3.2</A>)
|
||||||
that follows the SCRIPT_NAME
|
that follows the SCRIPT_NAME
|
||||||
portion of the path.
|
portion of the path.
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
@ -1285,7 +1285,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
case of the original segment through the translation.
|
case of the original segment through the translation.
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
The
|
The
|
||||||
translation
|
translation
|
||||||
algorithm the server uses to derive PATH_TRANSLATED is
|
algorithm the server uses to derive PATH_TRANSLATED is
|
||||||
implementation defined; CGI scripts which use this variable may
|
implementation defined; CGI scripts which use this variable may
|
||||||
@ -1303,7 +1303,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
</A>
|
</A>
|
||||||
</H4>
|
</H4>
|
||||||
<P>
|
<P>
|
||||||
A URL-encoded
|
A URL-encoded
|
||||||
string; the <query> part of the
|
string; the <query> part of the
|
||||||
Script-URI.
|
Script-URI.
|
||||||
(See
|
(See
|
||||||
@ -1371,7 +1371,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
Servers SHOULD provide this information to
|
Servers SHOULD provide this information to
|
||||||
scripts.
|
scripts.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H4>
|
<H4>
|
||||||
<A NAME="6.1.11">
|
<A NAME="6.1.11">
|
||||||
6.1.11. REMOTE_IDENT
|
6.1.11. REMOTE_IDENT
|
||||||
@ -1398,7 +1398,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
Servers MAY supply this information to scripts if the
|
Servers MAY supply this information to scripts if the
|
||||||
RFC1413 [<A HREF="#[11]">11</A>] lookup is performed.
|
RFC1413 [<A HREF="#[11]">11</A>] lookup is performed.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H4>
|
<H4>
|
||||||
<A NAME="6.1.12">
|
<A NAME="6.1.12">
|
||||||
6.1.12. REMOTE_USER
|
6.1.12. REMOTE_USER
|
||||||
@ -1426,7 +1426,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
Servers SHOULD provide this metavariable
|
Servers SHOULD provide this metavariable
|
||||||
to scripts.
|
to scripts.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H4>
|
<H4>
|
||||||
<A NAME="6.1.13">
|
<A NAME="6.1.13">
|
||||||
6.1.13. REQUEST_METHOD
|
6.1.13. REQUEST_METHOD
|
||||||
@ -1438,7 +1438,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
is set to the
|
is set to the
|
||||||
method with which the request was made, as described in section
|
method with which the request was made, as described in section
|
||||||
5.1.1 of the HTTP/1.0 specification [<A HREF="#[3]">3</A>] and
|
5.1.1 of the HTTP/1.0 specification [<A HREF="#[3]">3</A>] and
|
||||||
section 5.1.1 of the
|
section 5.1.1 of the
|
||||||
HTTP/1.1 specification [<A HREF="#[8]">8</A>].
|
HTTP/1.1 specification [<A HREF="#[8]">8</A>].
|
||||||
</P><!--#if expr="! $GUI" -->
|
</P><!--#if expr="! $GUI" -->
|
||||||
<P></P><!--#endif -->
|
<P></P><!--#endif -->
|
||||||
@ -1449,7 +1449,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
extension-method = token
|
extension-method = token
|
||||||
</PRE>
|
</PRE>
|
||||||
<P>
|
<P>
|
||||||
The method is case sensitive.
|
The method is case sensitive.
|
||||||
CGI/1.1 servers MAY choose to process some methods
|
CGI/1.1 servers MAY choose to process some methods
|
||||||
directly rather than passing them to scripts.
|
directly rather than passing them to scripts.
|
||||||
</P>
|
</P>
|
||||||
@ -1460,7 +1460,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
Servers MUST provide this metavariable
|
Servers MUST provide this metavariable
|
||||||
to scripts.
|
to scripts.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H4>
|
<H4>
|
||||||
<A NAME="6.1.14">
|
<A NAME="6.1.14">
|
||||||
6.1.14. SCRIPT_NAME
|
6.1.14. SCRIPT_NAME
|
||||||
@ -1494,7 +1494,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
Servers MUST provide this metavariable
|
Servers MUST provide this metavariable
|
||||||
to scripts.
|
to scripts.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H4>
|
<H4>
|
||||||
<A NAME="6.1.15">
|
<A NAME="6.1.15">
|
||||||
6.1.15. SERVER_NAME
|
6.1.15. SERVER_NAME
|
||||||
@ -1505,7 +1505,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
metavariable
|
metavariable
|
||||||
is set to the
|
is set to the
|
||||||
name of the
|
name of the
|
||||||
server, as
|
server, as
|
||||||
derived from the <host> part of the
|
derived from the <host> part of the
|
||||||
Script-URI
|
Script-URI
|
||||||
(see <A HREF="#3.2">section 3.2</A>).
|
(see <A HREF="#3.2">section 3.2</A>).
|
||||||
@ -1544,7 +1544,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
Servers MUST provide this metavariable
|
Servers MUST provide this metavariable
|
||||||
to scripts.
|
to scripts.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H4>
|
<H4>
|
||||||
<A NAME="6.1.17">
|
<A NAME="6.1.17">
|
||||||
6.1.17. SERVER_PROTOCOL
|
6.1.17. SERVER_PROTOCOL
|
||||||
@ -1589,7 +1589,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
Servers MUST provide this metavariable
|
Servers MUST provide this metavariable
|
||||||
to scripts.
|
to scripts.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H4>
|
<H4>
|
||||||
<A NAME="6.1.18">
|
<A NAME="6.1.18">
|
||||||
6.1.18. SERVER_SOFTWARE
|
6.1.18. SERVER_SOFTWARE
|
||||||
@ -1641,7 +1641,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
<P>
|
<P>
|
||||||
For non-parsed header (NPH) scripts (see
|
For non-parsed header (NPH) scripts (see
|
||||||
<A HREF="#7.1">section 7.1</A>
|
<A HREF="#7.1">section 7.1</A>
|
||||||
below),
|
below),
|
||||||
servers SHOULD
|
servers SHOULD
|
||||||
attempt to ensure that the data
|
attempt to ensure that the data
|
||||||
supplied to the script are precisely
|
supplied to the script are precisely
|
||||||
@ -1705,7 +1705,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
internal and no transport-visible
|
internal and no transport-visible
|
||||||
buffering.
|
buffering.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H3>
|
<H3>
|
||||||
<A NAME="7.2">
|
<A NAME="7.2">
|
||||||
7.2. Parsed Header Output
|
7.2. Parsed Header Output
|
||||||
@ -1790,7 +1790,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
a member of the "one of these is required" set of header
|
a member of the "one of these is required" set of header
|
||||||
fields.
|
fields.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H4>
|
<H4>
|
||||||
<A NAME="7.2.1.2">
|
<A NAME="7.2.1.2">
|
||||||
7.2.1.2. Location
|
7.2.1.2. Location
|
||||||
@ -1819,7 +1819,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
value is either an absolute URI with optional fragment,
|
value is either an absolute URI with optional fragment,
|
||||||
as defined in RFC 1630 [<A HREF="#[1]">1</A>], or an absolute path
|
as defined in RFC 1630 [<A HREF="#[1]">1</A>], or an absolute path
|
||||||
within the server's URI space (<EM>i.e.</EM>,
|
within the server's URI space (<EM>i.e.</EM>,
|
||||||
omitting the scheme and network-related fields) and optional
|
omitting the scheme and network-related fields) and optional
|
||||||
query-string. If an absolute URI is returned by the script,
|
query-string. If an absolute URI is returned by the script,
|
||||||
then the
|
then the
|
||||||
server MUST generate a
|
server MUST generate a
|
||||||
@ -1867,7 +1867,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
The valid status codes are listed in section 6.1.1 of the HTTP/1.0
|
The valid status codes are listed in section 6.1.1 of the HTTP/1.0
|
||||||
specifications [<A HREF="#[3]">3</A>]. If the SERVER_PROTOCOL is
|
specifications [<A HREF="#[3]">3</A>]. If the SERVER_PROTOCOL is
|
||||||
"HTTP/1.1", then the status codes defined in the HTTP/1.1
|
"HTTP/1.1", then the status codes defined in the HTTP/1.1
|
||||||
specification [<A HREF="#[8]">8</A>] may
|
specification [<A HREF="#[8]">8</A>] may
|
||||||
be used. If the script does not return a "<SAMP>Status</SAMP>" header
|
be used. If the script does not return a "<SAMP>Status</SAMP>" header
|
||||||
field, then "200 OK" SHOULD be assumed by the server.
|
field, then "200 OK" SHOULD be assumed by the server.
|
||||||
</P>
|
</P>
|
||||||
@ -1879,7 +1879,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
SHOULD include a "Status: 404 Not Found" in the
|
SHOULD include a "Status: 404 Not Found" in the
|
||||||
header data returned to the server.
|
header data returned to the server.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H4>
|
<H4>
|
||||||
<A NAME="7.2.1.4">
|
<A NAME="7.2.1.4">
|
||||||
7.2.1.4. Extension header fields
|
7.2.1.4. Extension header fields
|
||||||
@ -1941,7 +1941,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
</H3>
|
</H3>
|
||||||
<P>
|
<P>
|
||||||
Servers MUST support the standard mechanism (described below) which
|
Servers MUST support the standard mechanism (described below) which
|
||||||
allows
|
allows
|
||||||
script authors to determine
|
script authors to determine
|
||||||
what URL to use in documents
|
what URL to use in documents
|
||||||
which reference the script;
|
which reference the script;
|
||||||
@ -1951,11 +1951,11 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
mechanism is as follows:
|
mechanism is as follows:
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
The server
|
The server
|
||||||
MUST translate the header data from the CGI header field syntax to
|
MUST translate the header data from the CGI header field syntax to
|
||||||
the HTTP
|
the HTTP
|
||||||
header field syntax if these differ. For example, the character
|
header field syntax if these differ. For example, the character
|
||||||
sequence for
|
sequence for
|
||||||
newline (such as Unix's ASCII NL) used by CGI scripts may not be the
|
newline (such as Unix's ASCII NL) used by CGI scripts may not be the
|
||||||
same as that used by HTTP (ASCII CR followed by LF). The server MUST
|
same as that used by HTTP (ASCII CR followed by LF). The server MUST
|
||||||
also resolve any conflicts between header fields returned by the script
|
also resolve any conflicts between header fields returned by the script
|
||||||
@ -2052,7 +2052,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
</LI>
|
</LI>
|
||||||
<LI>define the behaviour for <SAMP>"."</SAMP> or <SAMP>".."</SAMP> path
|
<LI>define the behaviour for <SAMP>"."</SAMP> or <SAMP>".."</SAMP> path
|
||||||
segments; <EM>i.e.</EM>, whether they are prohibited, treated as
|
segments; <EM>i.e.</EM>, whether they are prohibited, treated as
|
||||||
ordinary path
|
ordinary path
|
||||||
segments or interpreted in accordance with the relative URL
|
segments or interpreted in accordance with the relative URL
|
||||||
specification [<A HREF="#[7]">7</A>];
|
specification [<A HREF="#[7]">7</A>];
|
||||||
</LI>
|
</LI>
|
||||||
@ -2143,7 +2143,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
|
|
||||||
<H2>
|
<H2>
|
||||||
<A NAME="9.0">
|
<A NAME="9.0">
|
||||||
9.
|
9.
|
||||||
Script Implementation
|
Script Implementation
|
||||||
</A>
|
</A>
|
||||||
</H2>
|
</H2>
|
||||||
@ -2219,7 +2219,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
Found' if PATH_INFO is not NULL.
|
Found' if PATH_INFO is not NULL.
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
If a script is processing the output of a form, it SHOULD
|
If a script is processing the output of a form, it SHOULD
|
||||||
verify that the CONTENT_TYPE
|
verify that the CONTENT_TYPE
|
||||||
is "<SAMP>application/x-www-form-urlencoded</SAMP>" [<A HREF="#[2]">2</A>]
|
is "<SAMP>application/x-www-form-urlencoded</SAMP>" [<A HREF="#[2]">2</A>]
|
||||||
or whatever other media type is expected.
|
or whatever other media type is expected.
|
||||||
@ -2231,12 +2231,12 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
of void path segments ("<SAMP>//</SAMP>") and special path segments
|
of void path segments ("<SAMP>//</SAMP>") and special path segments
|
||||||
(<SAMP>"."</SAMP> and
|
(<SAMP>"."</SAMP> and
|
||||||
<SAMP>".."</SAMP>). They SHOULD either be removed from the path before
|
<SAMP>".."</SAMP>). They SHOULD either be removed from the path before
|
||||||
use in OS
|
use in OS
|
||||||
system calls, or the request SHOULD be rejected with
|
system calls, or the request SHOULD be rejected with
|
||||||
'404 Not Found'.
|
'404 Not Found'.
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
As it is impossible for
|
As it is impossible for
|
||||||
scripts to determine the client URI that
|
scripts to determine the client URI that
|
||||||
initiated a
|
initiated a
|
||||||
request without knowledge of the specific server in
|
request without knowledge of the specific server in
|
||||||
@ -2246,7 +2246,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
tag in the document.
|
tag in the document.
|
||||||
</P>
|
</P>
|
||||||
<P>
|
<P>
|
||||||
When returning header fields,
|
When returning header fields,
|
||||||
scripts SHOULD try to send the CGI
|
scripts SHOULD try to send the CGI
|
||||||
header fields (see section
|
header fields (see section
|
||||||
<A HREF="#7.2">7.2</A>) as soon as possible, and
|
<A HREF="#7.2">7.2</A>) as soon as possible, and
|
||||||
@ -2254,7 +2254,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
before any HTTP header fields. This may
|
before any HTTP header fields. This may
|
||||||
help reduce the server's memory requirements.
|
help reduce the server's memory requirements.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H2>
|
<H2>
|
||||||
<A NAME="10.0">
|
<A NAME="10.0">
|
||||||
10. System Specifications
|
10. System Specifications
|
||||||
@ -2300,7 +2300,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
</P>
|
</P>
|
||||||
</DD>
|
</DD>
|
||||||
</DL>
|
</DL>
|
||||||
|
|
||||||
<H3>
|
<H3>
|
||||||
<A NAME="10.2">
|
<A NAME="10.2">
|
||||||
10.2. Unix
|
10.2. Unix
|
||||||
@ -2356,7 +2356,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
</P>
|
</P>
|
||||||
</DD>
|
</DD>
|
||||||
</DL>
|
</DL>
|
||||||
|
|
||||||
<H2>
|
<H2>
|
||||||
<A NAME="11.0">
|
<A NAME="11.0">
|
||||||
11. Security Considerations
|
11. Security Considerations
|
||||||
@ -2371,7 +2371,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
<P>
|
<P>
|
||||||
As discussed in the security considerations of the HTTP
|
As discussed in the security considerations of the HTTP
|
||||||
specifications [<A HREF="#[3]">3</A>,<A HREF="#[8]">8</A>], the
|
specifications [<A HREF="#[3]">3</A>,<A HREF="#[8]">8</A>], the
|
||||||
convention has been established that the
|
convention has been established that the
|
||||||
GET and HEAD methods should be 'safe'; they should cause no
|
GET and HEAD methods should be 'safe'; they should cause no
|
||||||
side-effects and only have the significance of resource retrieval.
|
side-effects and only have the significance of resource retrieval.
|
||||||
</P>
|
</P>
|
||||||
@ -2386,7 +2386,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
requests are those that may be repeated an arbitrary number of times
|
requests are those that may be repeated an arbitrary number of times
|
||||||
and produce side effects identical to a single request.
|
and produce side effects identical to a single request.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H3>
|
<H3>
|
||||||
<A NAME="11.2">
|
<A NAME="11.2">
|
||||||
11.2. HTTP Header
|
11.2. HTTP Header
|
||||||
@ -2410,7 +2410,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
HTTP_PROXY_AUTHORIZATION
|
HTTP_PROXY_AUTHORIZATION
|
||||||
metavariable.
|
metavariable.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H3>
|
<H3>
|
||||||
<A NAME="11.3">
|
<A NAME="11.3">
|
||||||
11.3. Script
|
11.3. Script
|
||||||
@ -2429,7 +2429,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
SHOULD be taken to protect the core memory of the server, or to
|
SHOULD be taken to protect the core memory of the server, or to
|
||||||
ensure that untrusted code cannot be executed.
|
ensure that untrusted code cannot be executed.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H3>
|
<H3>
|
||||||
<A NAME="11.4">
|
<A NAME="11.4">
|
||||||
11.4. Data Length and Buffering Considerations
|
11.4. Data Length and Buffering Considerations
|
||||||
@ -2504,7 +2504,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
Patrick M<SUP>c</SUP>Manus, Adam Donahue,
|
Patrick M<SUP>c</SUP>Manus, Adam Donahue,
|
||||||
Ross Patterson, and Harald Alvestrand.
|
Ross Patterson, and Harald Alvestrand.
|
||||||
</P>
|
</P>
|
||||||
|
|
||||||
<H2>
|
<H2>
|
||||||
<A NAME="13.0">
|
<A NAME="13.0">
|
||||||
13. References
|
13. References
|
||||||
@ -2554,7 +2554,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
</DD>
|
</DD>
|
||||||
<DT><A NAME="[6]">[6]</A>
|
<DT><A NAME="[6]">[6]</A>
|
||||||
</DT>
|
</DT>
|
||||||
<DD>Crocker, D.H., 'Standard for the Format of ARPA Internet Text
|
<DD>Crocker, D.H., 'Standard for the Format of ARPA Internet Text
|
||||||
Messages', STD 11, RFC 822, University of Delaware, August 1982.
|
Messages', STD 11, RFC 822, University of Delaware, August 1982.
|
||||||
<P>
|
<P>
|
||||||
</P>
|
</P>
|
||||||
@ -2614,7 +2614,7 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
</P>
|
</P>
|
||||||
</DD>
|
</DD>
|
||||||
</DL>
|
</DL>
|
||||||
|
|
||||||
<H2>
|
<H2>
|
||||||
<A NAME="14.0">
|
<A NAME="14.0">
|
||||||
14. Authors' Addresses
|
14. Authors' Addresses
|
||||||
@ -2669,6 +2669,6 @@ INTERNET-DRAFT Expires 1 December 1998 [Page 2]
|
|||||||
HREF="mailto:drtr@etrade.co.uk"
|
HREF="mailto:drtr@etrade.co.uk"
|
||||||
><SAMP>drtr@etrade.co.uk</SAMP></A>
|
><SAMP>drtr@etrade.co.uk</SAMP></A>
|
||||||
</ADDRESS>
|
</ADDRESS>
|
||||||
|
|
||||||
</BODY>
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
||||||
|
@ -518,8 +518,8 @@ int chown_main(int argc, char **argv);
|
|||||||
int gunzip_main(int argc, char **argv);
|
int gunzip_main(int argc, char **argv);
|
||||||
#endif
|
#endif
|
||||||
int bbunpack(char **argv,
|
int bbunpack(char **argv,
|
||||||
char* (*make_new_name)(char *filename),
|
char* (*make_new_name)(char *filename),
|
||||||
USE_DESKTOP(long long) int (*unpacker)(void)
|
USE_DESKTOP(long long) int (*unpacker)(void)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -250,11 +250,11 @@ int copy_file(const char *source, const char *dest, int flags)
|
|||||||
|| (flags & FILEUTILS_SET_SECURITY_CONTEXT))
|
|| (flags & FILEUTILS_SET_SECURITY_CONTEXT))
|
||||||
&& is_selinux_enabled() > 0
|
&& is_selinux_enabled() > 0
|
||||||
) {
|
) {
|
||||||
security_context_t con;
|
security_context_t con;
|
||||||
if (getfscreatecon(&con) == -1) {
|
if (getfscreatecon(&con) == -1) {
|
||||||
bb_perror_msg("getfscreatecon");
|
bb_perror_msg("getfscreatecon");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (con) {
|
if (con) {
|
||||||
if(setfilecon(dest, con) == -1) {
|
if(setfilecon(dest, con) == -1) {
|
||||||
bb_perror_msg("setfilecon:%s,%s", dest, con);
|
bb_perror_msg("setfilecon:%s,%s", dest, con);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* libbb/selinux_common.c
|
* libbb/selinux_common.c
|
||||||
* -- common SELinux utility functions
|
* -- common SELinux utility functions
|
||||||
*
|
*
|
||||||
* Copyright 2007 KaiGai Kohei <kaigai@kaigai.gr.jp>
|
* Copyright 2007 KaiGai Kohei <kaigai@kaigai.gr.jp>
|
||||||
*/
|
*/
|
||||||
#include "busybox.h"
|
#include "busybox.h"
|
||||||
|
@ -51,7 +51,7 @@ enum {
|
|||||||
REAL_KEY_HOME = '7', // vt100? linux vt? or what?
|
REAL_KEY_HOME = '7', // vt100? linux vt? or what?
|
||||||
REAL_KEY_END = '8',
|
REAL_KEY_END = '8',
|
||||||
REAL_KEY_HOME_ALT = '1', // ESC [1~ (vt100? linux vt? or what?)
|
REAL_KEY_HOME_ALT = '1', // ESC [1~ (vt100? linux vt? or what?)
|
||||||
REAL_KEY_END_ALT = '4', // ESC [4~
|
REAL_KEY_END_ALT = '4', // ESC [4~
|
||||||
REAL_KEY_HOME_XTERM = 'H',
|
REAL_KEY_HOME_XTERM = 'H',
|
||||||
REAL_KEY_END_XTERM = 'F',
|
REAL_KEY_END_XTERM = 'F',
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* chcon -- change security context, based on coreutils-5.97-13
|
* chcon -- change security context, based on coreutils-5.97-13
|
||||||
*
|
*
|
||||||
* Port to busybox: KaiGai Kohei <kaigai@kaigai.gr.jp>
|
* Port to busybox: KaiGai Kohei <kaigai@kaigai.gr.jp>
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006 - 2007 KaiGai Kohei <kaigai@kaigai.gr.jp>
|
* Copyright (C) 2006 - 2007 KaiGai Kohei <kaigai@kaigai.gr.jp>
|
||||||
*/
|
*/
|
||||||
#include "busybox.h"
|
#include "busybox.h"
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
2
|
2
|
||||||
4
|
4
|
||||||
fx is a function
|
fx is a function
|
||||||
fx ()
|
fx ()
|
||||||
{
|
{
|
||||||
i=0;
|
i=0;
|
||||||
for ((1; i < 3; i++ ))
|
for ((1; i < 3; i++ ))
|
||||||
do
|
do
|
||||||
|
@ -73,7 +73,7 @@ done
|
|||||||
type fx
|
type fx
|
||||||
fx
|
fx
|
||||||
|
|
||||||
# errors
|
# errors
|
||||||
for (( i=0; "i < 3" ))
|
for (( i=0; "i < 3" ))
|
||||||
do
|
do
|
||||||
echo $i
|
echo $i
|
||||||
|
@ -144,12 +144,12 @@ echo 40 $(( 8 ^ 32 ))
|
|||||||
#ash# echo 10 $(( 32#a ))
|
#ash# echo 10 $(( 32#a ))
|
||||||
#ash# echo 10 $(( 56#a ))
|
#ash# echo 10 $(( 56#a ))
|
||||||
#ash# echo 10 $(( 64#a ))
|
#ash# echo 10 $(( 64#a ))
|
||||||
#ash#
|
#ash#
|
||||||
#ash# echo 10 $(( 16#A ))
|
#ash# echo 10 $(( 16#A ))
|
||||||
#ash# echo 10 $(( 32#A ))
|
#ash# echo 10 $(( 32#A ))
|
||||||
#ash# echo 36 $(( 56#A ))
|
#ash# echo 36 $(( 56#A ))
|
||||||
#ash# echo 36 $(( 64#A ))
|
#ash# echo 36 $(( 64#A ))
|
||||||
#ash#
|
#ash#
|
||||||
#ash# echo 62 $(( 64#@ ))
|
#ash# echo 62 $(( 64#@ ))
|
||||||
#ash# echo 63 $(( 64#_ ))
|
#ash# echo 63 $(( 64#_ ))
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# check order and content of multiple here docs
|
# check order and content of multiple here docs
|
||||||
|
|
||||||
cat << EOF1 << EOF2
|
cat << EOF1 << EOF2
|
||||||
hi
|
hi
|
||||||
EOF1
|
EOF1
|
||||||
there
|
there
|
||||||
|
@ -18,7 +18,7 @@ do_test()
|
|||||||
cd "$1" || { echo "cannot cd $1!"; exit 1; }
|
cd "$1" || { echo "cannot cd $1!"; exit 1; }
|
||||||
for x in run-*; do
|
for x in run-*; do
|
||||||
test -f "$x" || continue
|
test -f "$x" || continue
|
||||||
case "$x" in
|
case "$x" in
|
||||||
"$0"|run-minimal|run-gprof) ;;
|
"$0"|run-minimal|run-gprof) ;;
|
||||||
*.orig|*~) ;;
|
*.orig|*~) ;;
|
||||||
#*) echo $x ; sh $x ;;
|
#*) echo $x ; sh $x ;;
|
||||||
|
46
shell/msh.c
46
shell/msh.c
@ -50,36 +50,36 @@ static char *find_applet_by_name(const char *applet)
|
|||||||
}
|
}
|
||||||
static void utoa_to_buf(unsigned n, char *buf, unsigned buflen)
|
static void utoa_to_buf(unsigned n, char *buf, unsigned buflen)
|
||||||
{
|
{
|
||||||
unsigned i, out, res;
|
unsigned i, out, res;
|
||||||
assert(sizeof(unsigned) == 4);
|
assert(sizeof(unsigned) == 4);
|
||||||
if (buflen) {
|
if (buflen) {
|
||||||
out = 0;
|
out = 0;
|
||||||
for (i = 1000000000; i; i /= 10) {
|
for (i = 1000000000; i; i /= 10) {
|
||||||
res = n / i;
|
res = n / i;
|
||||||
if (res || out || i == 1) {
|
if (res || out || i == 1) {
|
||||||
if (!--buflen) break;
|
if (!--buflen) break;
|
||||||
out++;
|
out++;
|
||||||
n -= res*i;
|
n -= res*i;
|
||||||
*buf++ = '0' + res;
|
*buf++ = '0' + res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*buf = '\0';
|
*buf = '\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static void itoa_to_buf(int n, char *buf, unsigned buflen)
|
static void itoa_to_buf(int n, char *buf, unsigned buflen)
|
||||||
{
|
{
|
||||||
if (buflen && n<0) {
|
if (buflen && n < 0) {
|
||||||
n = -n;
|
n = -n;
|
||||||
*buf++ = '-';
|
*buf++ = '-';
|
||||||
buflen--;
|
buflen--;
|
||||||
}
|
}
|
||||||
utoa_to_buf((unsigned)n, buf, buflen);
|
utoa_to_buf((unsigned)n, buf, buflen);
|
||||||
}
|
}
|
||||||
static char local_buf[12];
|
static char local_buf[12];
|
||||||
static char *itoa(int n)
|
static char *itoa(int n)
|
||||||
{
|
{
|
||||||
itoa_to_buf(n, local_buf, sizeof(local_buf));
|
itoa_to_buf(n, local_buf, sizeof(local_buf));
|
||||||
return local_buf;
|
return local_buf;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# include <setjmp.h>
|
# include <setjmp.h>
|
||||||
|
@ -73,7 +73,7 @@ HELLO
|
|||||||
prep; >t1; check "$unpack: already exists" "${bb}$unpack t1.$ext t2.$ext; echo \$?; cat t1 t2"
|
prep; >t1; check "$unpack: already exists" "${bb}$unpack t1.$ext t2.$ext; echo \$?; cat t1 t2"
|
||||||
|
|
||||||
|
|
||||||
# From old testsuite
|
# From old testsuite
|
||||||
expected="HELLO\n0\n"
|
expected="HELLO\n0\n"
|
||||||
prep; check "$unpack: stream unpack" "cat t1.$ext | ${bb}$unpack; echo $?"
|
prep; check "$unpack: stream unpack" "cat t1.$ext | ${bb}$unpack; echo $?"
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ struct bsd_globals {
|
|||||||
static struct bsd_globals *bsd_globals_ptr;
|
static struct bsd_globals *bsd_globals_ptr;
|
||||||
|
|
||||||
#define disklabelbuffer (bsd_globals_ptr->disklabelbuffer)
|
#define disklabelbuffer (bsd_globals_ptr->disklabelbuffer)
|
||||||
#define xbsd_dlabel (bsd_globals_ptr->xbsd_dlabel)
|
#define xbsd_dlabel (bsd_globals_ptr->xbsd_dlabel)
|
||||||
|
|
||||||
|
|
||||||
/* Code */
|
/* Code */
|
||||||
|
Loading…
Reference in New Issue
Block a user