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.

79 lines
2.9 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> Display ServerVariables from Request Object</TITLE>
  9. <BODY> <BODY BGCOLOR=#FFFFFF>
  10. <!--
  11. ActiveState PerlScript sample
  12. PerlScript: The coolest way to program custom web solutions.
  13. -->
  14. <!-- Masthead -->
  15. <TABLE CELLPADDING=3 BORDER=0 CELLSPACING=0>
  16. <TR VALIGN=TOP ><TD WIDTH=400>
  17. <A NAME="TOP"><IMG SRC="PSBWlogo.gif" WIDTH=400 HEIGHT=48 ALT="ActiveState PerlScript" BORDER=0></A><P>
  18. </TD></TR></TABLE>
  19. <H3>The following is a list of HTTP Variables</H3>
  20. <TABLE BORDER=1>
  21. <TR><TD> AUTH_TYPE </TD> <TD>
  22. <%=$Request->ServerVariables('AUTH_TYPE')->item%> </TD>
  23. <TR><TD> AUTH_PASS </TD> <TD>
  24. <%=$Request->ServerVariables('AUTH_PASS')->item%> </TD>
  25. <TR><TD> CONTENT_LENGTH </TD> <TD>
  26. <%=$Request->ServerVariables('CONTENT_LENGTH')->item%> </TD>
  27. <TR><TD> CONTENT_TYPE </TD> <TD>
  28. <%=$Request->ServerVariables('CONTENT_TYPE')->item%> </TD>
  29. <TR><TD> GATEWAY_INTERFACE </TD> <TD>
  30. <%=$Request->ServerVariables('GATEWAY_INTERFACE')->item%> </TD>
  31. <TR><TD> PATH_INFO </TD> <TD>
  32. <%=$Request->ServerVariables('PATH_INFO')->item%> </TD>
  33. <TR><TD> PATH_TRANSLATED </TD> <TD>
  34. <%=$Request->ServerVariables('PATH_TRANSLATED')->item%> </TD>
  35. <TR><TD> QUERY_STRING </TD> <TD>
  36. <%=$Request->ServerVariables('QUERY_STRING')->item%></TD>
  37. <TR><TD> SCRIPT_NAME </TD> <TD>
  38. <%=$Request->ServerVariables('SCRIPT_NAME')->item%></TD>
  39. <TR><TD> SERVER_NAME </TD> <TD>
  40. <%=$Request->ServerVariables('SERVER_NAME')->item%></TD>
  41. <TR><TD> SERVER_PORT </TD> <TD>
  42. <%=$Request->ServerVariables('SERVER_PORT')->item%></TD>
  43. <TR><TD> SERVER_PROTOCOL </TD> <TD>
  44. <%=$Request->ServerVariables('SERVER_PROTOCOL')->item%></TD>
  45. <TR><TD> SERVER_SOFTWARE </TD> <TD>
  46. <%=$Request->ServerVariables('SERVER_SOFTWARE')->item%></TD>
  47. <TR><TD> HTTP_ACCEPT </TD> <TD>
  48. <%=$Request->ServerVariables('HTTP_ACCEPT')->item%></TD>
  49. <TR><TD> REMOTE_ADDR </TD> <TD>
  50. <%=$Request->ServerVariables('REMOTE_ADDR')->item%></TD>
  51. <TR><TD> REMOTE_HOST </TD> <TD>
  52. <%=$Request->ServerVariables('REMOTE_HOST')->item%></TD>
  53. <TR><TD> REMOTE_USER </TD> <TD>
  54. <%=$Request->ServerVariables('REMOTE_USER')->item%></TD>
  55. <TR><TD> ALL_HTTP </TD> <TD>
  56. <%=$Request->ServerVariables('ALL_HTTP')->item%></TD>
  57. </TABLE>
  58. <!-- +++++++++++++++++++++++++++++++++++++
  59. here is the standard showsource link -
  60. Note that PerlScript must be the default language --> <hr>
  61. <%
  62. $url = $Request->ServerVariables('PATH_INFO')->item;
  63. $_ = $Request->ServerVariables('PATH_TRANSLATED')->item;
  64. s/[\/\\](\w*\.asp\Z)//m;
  65. $params = 'filename='."$1".'&URL='."$url";
  66. $params =~ s#([^a-zA-Z0-9&_.:%/-\\]{1})#uc '%' . unpack('H2', $1)#eg;
  67. %>
  68. <A HREF="index.htm"> Return </A>
  69. <A HREF="showsource.asp?<%=$params%>">
  70. <h4><i>view the source</i></h4></A>
  71. </BODY>
  72. </HTML>