Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
6.0 KiB

  1. <%@ LANGUAGE = PerlScript%>
  2. <HTML>
  3. <HEAD>
  4. <!--
  5. Copyright (c) 1996, Microsoft Corporation. All rights reserved.
  6. Developed by ActiveState Internet Corp., http://www.ActiveState.com
  7. -->
  8. <TITLE> Shows The values of predetermined environment variables. </TITLE>
  9. </HEAD>
  10. <BODY> <BODY BGCOLOR=#FFFFFF>
  11. <!--
  12. ActiveState PerlScript sample
  13. PerlScript: The coolest way to program custom web solutions.
  14. -->
  15. <!-- Masthead -->
  16. <TABLE CELLPADDING=3 BORDER=0 CELLSPACING=0>
  17. <TR VALIGN=TOP ><TD WIDTH=400>
  18. <A NAME="TOP"><IMG SRC="PSBWlogo.gif" WIDTH=400 HEIGHT=48 ALT="ActiveState PerlScript" BORDER=0></A><P>
  19. </TD></TR></TABLE>
  20. <H2> The values of predetermined environment variables. </H2>
  21. <BR><BR>
  22. <TABLE BORDER=1>
  23. <TR>
  24. <TD VALIGN=TOP>Variable<TD VALIGN=TOP>Description<TD VALIGN=TOP>Value
  25. <TR>
  26. <TR><TD VALIGN=TOP>ALL_HTTP <TD VALIGN=TOP>As per ISAPI, all HTTP headers that were not already parsed into one of the above variables. These variables are of the form HTTP_<header field name>.<TD VALIGN=TOP><%= $Request->ServerVariables('ALL_HTTP')->item %>
  27. <!-- <TR><TD VALIGN=TOP>AUTH_PASS <TD VALIGN=TOP>The password corresponding to REMOTE_USER as supplied by the client. <TD VALIGN=TOP><%= $Request->ServerVariables('AUTH_PASS')->item %> -->
  28. <TR><TD VALIGN=TOP>AUTH_TYPE <TD VALIGN=TOP>If the server supports user authentication, and the script is protected, this is the protocol-specific authentication method used to validate the user.<TD VALIGN=TOP><%= $Request->ServerVariables('AUTH_TYPE')->item %>
  29. <TR><TD VALIGN=TOP>CONTENT_LENGTH <TD VALIGN=TOP>The length of the said content as given by the client. <TD VALIGN=TOP><%= $Request->ServerVariables('CONTENT_LENGTH')->item %>
  30. <TR><TD VALIGN=TOP>CONTENT_TYPE <TD VALIGN=TOP>For queries which have attached information, such as HTTP POST and PUT, this is the content type of the data. <TD VALIGN=TOP><%= $Request->ServerVariables('CONTENT_TYPE')->item %>
  31. <TR><TD VALIGN=TOP>GATEWAY_INTERFACE <TD VALIGN=TOP>The revision of the CGI specification to which this server complies. Format: CGI/revision<TD VALIGN=TOP><%= $Request->ServerVariables('GATEWAY_INTERFACE')->item %>
  32. <TR><TD VALIGN=TOP>PATH_INFO <TD VALIGN=TOP>The extra path information, as given by the client. In other words, scripts can be accessed by their virtual pathname, followed by extra information at the end of this path. The extra information is sent as PATH_INFO. This information is decoded by the server if it comes from a URL before it is passed to the CGI script.<TD VALIGN=TOP><%= $Request->ServerVariables('PATH_INFO')->item %>
  33. <TR><TD VALIGN=TOP>PATH_TRANSLATED <TD VALIGN=TOP>The server provides a translated version of PATH_INFO, which takes the path and does any virtual-to-physical mapping to it.<TD VALIGN=TOP><%= $Request->ServerVariables('PATH_TRANSLATED')->item %>
  34. <TR><TD VALIGN=TOP>QUERY_STRING <TD VALIGN=TOP>The information which follows the ? in the URL which referenced this script. This is the query information.<TD VALIGN=TOP><%= $Request->ServerVariables('QUERY_STRING')->item %>
  35. <TR><TD VALIGN=TOP>REMOTE_ADDR <TD VALIGN=TOP>The IP address of the remote host making the request. <TD VALIGN=TOP><%= $Request->ServerVariables('REMOTE_ADDR')->item %>
  36. <TR><TD VALIGN=TOP>REMOTE_HOST <TD VALIGN=TOP>The hostname making the request. If the server does not have this information, it will set REMOTE_ADDR and leave this empty.<TD VALIGN=TOP><%= $Request->ServerVariables('REMOTE_HOST')->item %>
  37. <!-- <TR><TD VALIGN=TOP>REMOTE_IDENT <TD VALIGN=TOP>If the HTTP server supports RFC 931 identification, then this variable will be set to the remote user name retrieved from the server. Usage of this variable should be limited to logging only.<TD VALIGN=TOP><%= $Request->ServerVariables('REMOTE_IDENT')->item %> -->
  38. <TR><TD VALIGN=TOP>REMOTE_USER <TD VALIGN=TOP>If the server supports user authentication, and the script is protected, this is the username by which the user is authenticated. <TD VALIGN=TOP><%= $Request->ServerVariables('REMOTE_USER')->item %>
  39. <!-- <TR><TD VALIGN=TOP>REQUEST_BODY <TD VALIGN=TOP>The body of the request. Used with POST messages to access the posted information.<TD VALIGN=TOP><%= $Request->ServerVariables('REQUEST_BODY')->item %> -->
  40. <TR><TD VALIGN=TOP>REQUEST_METHOD <TD VALIGN=TOP>The method with which the request was made. For HTTP, this is 'GET', 'HEAD', 'POST', etc.<TD VALIGN=TOP><%= $Request->ServerVariables('REQUEST_METHOD')->item %>
  41. <TR><TD VALIGN=TOP>SCRIPT_NAME <TD VALIGN=TOP>A virtual path to the script being executed, used for self-referencing URLs.<TD VALIGN=TOP><%= $Request->ServerVariables('SCRIPT_NAME')->item %>
  42. <TR><TD VALIGN=TOP>SERVER_NAME <TD VALIGN=TOP>The server's host name, DNS alias, or IP address as it would appear in self-referencing URLs.<TD VALIGN=TOP><%= $Request->ServerVariables('SERVER_NAME')->item %>
  43. <TR><TD VALIGN=TOP>SERVER_PORT <TD VALIGN=TOP>The port number to which the request was sent.<TD VALIGN=TOP><%= $Request->ServerVariables('SERVER_PORT')->item %>
  44. <TR><TD VALIGN=TOP>SERVER_PROTOCOL <TD VALIGN=TOP>The name and revision of the information protcol this request came in with. Format: protocol/revision<TD VALIGN=TOP><%= $Request->ServerVariables('SERVER_PROTOCOL')->item %>
  45. <TR><TD VALIGN=TOP>SERVER_SOFTWARE <TD VALIGN=TOP>The name and version of the internet information server software answering the request (and running the gateway)->item. Format: name/version<TD VALIGN=TOP><%= $Request->ServerVariables('SERVER_SOFTWARE')->item %>
  46. </TABLE>
  47. <!-- +++++++++++++++++++++++++++++++++++++
  48. here is the standard showsource link -
  49. Note that PerlScript must be the default language --> <hr>
  50. <%
  51. $url = $Request->ServerVariables('PATH_INFO')->item;
  52. $_ = $Request->ServerVariables('PATH_TRANSLATED')->item;
  53. s/[\/\\](\w*\.asp\Z)//m;
  54. $params = 'filename='."$1".'&URL='."$url";
  55. $params =~ s#([^a-zA-Z0-9&_.:%/-\\]{1})#uc '%' . unpack('H2', $1)#eg;
  56. %>
  57. <A HREF="index.htm"> Return </A>
  58. <A HREF="showsource.asp?<%=$params%>">
  59. <h4><i>view the source</i></h4></A>
  60. <h4><i>view the source</i></h4></A>
  61. </BODY>
  62. </HTML>