#! /usr/bin/perl
#
# wrtten by Yuichi Koike ($Id: header.pl,v 1.1 2000/10/05 21:31:06 koike Exp $)
#

# Modules
use strict;
require "mylib.pl";

# Init
my %params = &read_params("GET");
my %ret = &retrieve($params{"url"}, "GET");
print "Content-type: text/html\n\n";
print "<!DOCTYPE HTML PUBLIC '-//IETF//DTD HTML//EN'>
<html>
<head>
<title>HTTP headers</title>
<style type='text/css'>
BODY {
	margin: 2em 1em 2em 30px;
	font-family: 'Arial', 'Helvetica', sans-serif;
	font-size: 11pt;
	color: black;
	background: white;
	background-position: top left;
	background-attachment: fixed;
	background-repeat: no-repeat;
}

A:hover {
	background: #FFFF90
} 

H1 {
	font-family: 'Arial', 'Helvetica', sans-serif;
	font-size: 24pt;
	font-weight: normal;
	color: #0050B2; 
}

H2 {
	font-family: 'Arial', 'Helvetica', sans-serif;
	font-size: 18pt;
	font-weight: normal;
	color: #0050B2; 
}

H3 {
	font-family: 'Arial', 'Helvetica', sans-serif;
	font-size: 14pt;
	font-weight: normal;
	color: #0050B2; 
}

H4{
	font-family: 'Arial', 'Helvetica', sans-serif;
	font-size: 12pt;
	font-weight: normal;
	color: #0050B2; 
}

P.end {
	font-size: 12pt;
	text-align: right;
}

DL DT {
	font-weight: bold;
}

DL DD {
	margin-bottom: 0.7em;
}

PRE {
	font-family: 'Courier New', 'Courier';
}

TT {
	font-family: 'Courier New', 'Courier';
	color: brown;
}

.GUI {
	font-family: 'Arial', 'Helvetica', sans-serif;
	font-size: 15px;
}

.title {
	text-align: center;
}

Table.intro {
	margin-left: 40px;
	border-width: 0;
}

Table.intro TD {
	font-size: 12pt;
	text-align: left;
	vertical-align: text-top;
}

Table.intro TH {
	font-size: 12pt;
	color: #0050B2; 
	text-align: left;
	vertical-align: text-top;
}

OL.toc LI {
	font-size: 12pt;
}

P.caption {
	font-size: 9pt;
	text-align: center;
	margin-top: 2pt;
}

.big {
	font-size: 15pt;
	font-weight: bold;
}

.step {
	font-size: 15pt;
	color: #0050B2; 
}

.result {
	font-size: 13pt;
	font-weight: bold;
}

.result2 {
	font-size: 12pt;
	font-weight: normal;
}

.mes {
	font-size: 10pt;
	margin-left: 30px;
}
</style>
</head>
<body>
<p><span class='step'>HTTP Headers of:</span><br>
[<a target='buttobi' href='";
print $ret{"response"}->base;
print "'><tt>";
print $ret{"response"}->base;
print "</tt></a>]\n</p>\n<hr>\n<pre>\n";
print $ret{"response"}->headers->as_string;
print "</pre><hr></body></html>\n";
