2017-09-08 13:29:09 -05:00
|
|
|
// Copyright 2017 The go-ethereum Authors
|
|
|
|
// This file is part of the go-ethereum library.
|
|
|
|
//
|
|
|
|
// The go-ethereum library is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU Lesser General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// The go-ethereum library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
/*
|
|
|
|
We use html templates to handle simple but as informative as possible error pages.
|
|
|
|
|
|
|
|
To eliminate circular dependency in case of an error, we don't store error pages on swarm.
|
|
|
|
We can't save the error pages as html files on disk, or when deploying compiled binaries
|
|
|
|
they won't be found.
|
|
|
|
|
|
|
|
For this reason we resort to save the HTML error pages as strings, which then can be
|
|
|
|
parsed by Go's html/template package
|
|
|
|
*/
|
|
|
|
package http
|
|
|
|
|
|
|
|
//This returns the HTML for generic errors
|
|
|
|
func GetGenericErrorPage() string {
|
|
|
|
page := `
|
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
|
|
|
<meta http-equiv="X-UA-Compatible" ww="chrome=1">
|
|
|
|
<meta name="description" content="Ethereum/Swarm error page">
|
|
|
|
<meta property="og:url" content="https://swarm-gateways.net/bzz:/theswarm.eth">
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
body, div, header, footer {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
body {
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.container {
|
|
|
|
min-width: 100%;
|
|
|
|
min-height: 100%;
|
|
|
|
max-height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
header {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
background-color: #ffa500;
|
|
|
|
/* height: 20vh; */
|
|
|
|
padding: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.header-left, .header-right {
|
|
|
|
width: 20%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.header-left {
|
|
|
|
padding-left: 40px;
|
|
|
|
float: left;
|
|
|
|
}
|
|
|
|
|
|
|
|
.header-right {
|
|
|
|
padding-right: 40px;
|
|
|
|
float: right;
|
|
|
|
}
|
|
|
|
|
|
|
|
.page-title {
|
|
|
|
/* margin-top: 4.5vh; */
|
|
|
|
text-align: center;
|
|
|
|
float: left;
|
|
|
|
width: 60%;
|
|
|
|
color: white;
|
|
|
|
}
|
|
|
|
|
|
|
|
content-body {
|
|
|
|
display: block;
|
|
|
|
margin: 0 auto;
|
|
|
|
/* width: 50%; */
|
|
|
|
min-height: 60vh;
|
|
|
|
max-height: 60vh;
|
|
|
|
padding: 50px 20px;
|
|
|
|
opacity: 0.6;
|
|
|
|
background-color: #A9F5BF;
|
|
|
|
}
|
|
|
|
|
|
|
|
table {
|
|
|
|
font-size: 1.2em;
|
|
|
|
margin: 0 auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
tr {
|
|
|
|
height: 60px;
|
|
|
|
}
|
|
|
|
|
|
|
|
td {
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.key {
|
|
|
|
color: #111;
|
|
|
|
font-weight: bold;
|
|
|
|
width: 200px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.value {
|
|
|
|
color: red;
|
|
|
|
font-weight: bold
|
|
|
|
}
|
|
|
|
|
|
|
|
footer {
|
|
|
|
height: 20vh;
|
|
|
|
background-color: #ffa500;
|
|
|
|
font-size: 1em;
|
|
|
|
text-align: center;
|
|
|
|
padding: 20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<title>Swarm::HTTP Error Page</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div class="container">
|
|
|
|
|
|
|
|
<header>
|
|
|
|
<div class="header-left">
|
|
|
|
<img style="height:18vh;margin-left:40px" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACrCAYAAACE5WWRAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QMKDzsK7uq5KAAAGndJREFUeNrtnXuU3MV15z+3qnokjYQkQA8wD4NsApg4WfzaEIN5GQgxWSfxiWObtZOsE++exDl2nGTxcZKTk3iPj53jRxwM8XHYYHsdP9aQALIBARbExDjGMbGDMCwvIQGWkITempGm+1d3/6j6df+6p3tmeqZ75tet+p6jwzDd0/37Vn3r3lu3qm5BQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkLCbGALPzszkI+dUEYsEgt2HcgqMr8bACOg5X5sST1XMhgHvhZ+HnGnU+OdwOWQLQVuA67H6wt1C1bzSVgJXcDZ/0EmVwMVBAPZ6vjKAeCTeP183Xr58pmv5ApnbEnEIHIKIhnKBAjYHrikim0Iw9ilGHsBYq9DuRTwcfgL6Gg0BIuAqxC5CJHNwE6UDAOIAy2HBUsWq+OQM5D5XFQvBX4f+AXgYeAGvH4rtKCAzlJd1kKW5S7wUuDXUF5NkKsv9JKBbFVLfzmgBtwHfA6v3y2TBUvC6tgsuRWR9wJ/CCyOvzwSO/QHwHvxuqvrzqxYqEZBOXccykfwvDKKRds8TjthFVED/hn4AF73l0FcyRU2XF2jS42MInIhIl8D3tZkPUInWuA04LcQGQe2oozNaMZWqUC1B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M8DngYbJ42rldQO0kFvEA
|
|
|
|
</div>
|
|
|
|
<div class="page-title">
|
|
|
|
<h1>There was a problem serving the requested page</h1>
|
|
|
|
</div>
|
|
|
|
<div class="header-right">
|
|
|
|
<div id="timestamp">{{.Timestamp}}</div>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<content-body>
|
|
|
|
<section>
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<td style="height: 150px; font-size: 1.3em; color: black; font-weight: bold">
|
|
|
|
Hmmmmm....Swarm was not able to serve your request!
|
|
|
|
</td>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td class="key">
|
|
|
|
Error message:
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="value">
|
2017-10-06 08:45:54 -05:00
|
|
|
{{.Msg}}
|
2017-09-08 13:29:09 -05:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="key">
|
|
|
|
Error code:
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="value">
|
|
|
|
{{.Code}}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</section>
|
|
|
|
</content-body>
|
|
|
|
|
|
|
|
<footer>
|
|
|
|
<p>
|
|
|
|
Swarm: Serverless Hosting Incentivised Peer-To-Peer Storage And Content Distribution<br/>
|
|
|
|
<a href="http://swarm-gateways.net/bzz:/theswarm.eth">Swarm</a>
|
|
|
|
</p>
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|
|
|
|
`
|
|
|
|
return page
|
|
|
|
}
|
|
|
|
|
|
|
|
//This returns the HTML for a 404 Not Found error
|
|
|
|
func GetNotFoundErrorPage() string {
|
|
|
|
page := `
|
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
|
|
|
<meta http-equiv="X-UA-Compatible" ww="chrome=1">
|
|
|
|
<meta name="description" content="Ethereum/Swarm error page">
|
|
|
|
<meta property="og:url" content="https://swarm-gateways.net/bzz:/theswarm.eth">
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
body, div, header, footer {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
body {
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.container {
|
|
|
|
min-width: 100%;
|
|
|
|
min-height: 100%;
|
|
|
|
max-height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
header {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
background-color: #ffa500;
|
|
|
|
/* height: 20vh; */
|
|
|
|
padding: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.header-left, .header-right {
|
|
|
|
width: 20%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.header-left {
|
|
|
|
padding-left: 40px;
|
|
|
|
float: left;
|
|
|
|
}
|
|
|
|
|
|
|
|
.header-right {
|
|
|
|
padding-right: 40px;
|
|
|
|
float: right;
|
|
|
|
}
|
|
|
|
|
|
|
|
.page-title {
|
|
|
|
/* margin-top: 4.5vh; */
|
|
|
|
text-align: center;
|
|
|
|
float: left;
|
|
|
|
width: 60%;
|
|
|
|
color: white;
|
|
|
|
}
|
|
|
|
|
|
|
|
content-body {
|
|
|
|
display: block;
|
|
|
|
margin: 0 auto;
|
|
|
|
/* width: 50%; */
|
|
|
|
min-height: 60vh;
|
|
|
|
max-height: 60vh;
|
|
|
|
padding: 50px 20px;
|
|
|
|
opacity: 0.6;
|
|
|
|
background-color: #A9F5BF;
|
|
|
|
}
|
|
|
|
|
|
|
|
table {
|
|
|
|
font-size: 1.2em;
|
|
|
|
margin: 0 auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
tr {
|
|
|
|
height: 60px;
|
|
|
|
}
|
|
|
|
|
|
|
|
td {
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.key {
|
|
|
|
color: #111;
|
|
|
|
font-weight: bold;
|
|
|
|
width: 200px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.value {
|
|
|
|
color: red;
|
|
|
|
font-weight: bold
|
|
|
|
}
|
|
|
|
|
|
|
|
footer {
|
|
|
|
height: 20vh;
|
|
|
|
background-color: #ffa500;
|
|
|
|
font-size: 1em;
|
|
|
|
text-align: center;
|
|
|
|
padding: 20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<title>Swarm::404 HTTP Not Found</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div class="container">
|
|
|
|
|
|
|
|
<header>
|
|
|
|
<div class="header-left">
|
|
|
|
<img style="height:18vh;margin-left:40px" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACrCAYAAACE5WWRAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QMKDzsK7uq5KAAAGndJREFUeNrtnXuU3MV15z+3qnokjYQkQA8wD4NsApg4WfzaEIN5GQgxWSfxiWObtZOsE++exDl2nGTxcZKTk3iPj53jRxwM8XHYYHsdP9aQALIBARbExDjGMbGDMCwvIQGWkITempGm+1d3/6j6df+6p3tmeqZ75tet+p6jwzDd0/37Vn3r3lu3qm5BQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkLCbGALPzszkI+dUEYsEgt2HcgqMr8bACOg5X5sST1XMhgHvhZ+HnGnU+OdwOWQLQVuA67H6wt1C1bzSVgJXcDZ/0EmVwMV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jkVOWQvnnOO/An+J16eTxZrO5RnCdHuxwGEWYXg/4aqSTnvIpzoMKsD1wHXAoY4juuEeBbgyWrDKLIQlwPeAT5Pp3uldu4BlBOV9wB9Ei9TuIVuF1fqdnwWunZLjURu857MgD1gZJeNtCH8PvJmplzf8NG7pQuBNwDgiz4Tb52m+CSzPgamC6hMgDyAsgbbnBluDdxsF8UPgM2T6VZTDbW+3t4U7Eo2MIvw6cAPwK9Nw1Gk4viEOhmaOCxzkSylE1XAJb45B+DoaWenp8kHTZdZzS/A48Am8bmifC8ur4NXjr5OB/xJdcB7vFC3WCPAM8DngYbJ42rldQO0kFvEA
|
|
|
|
</div>
|
|
|
|
<div class="page-title">
|
|
|
|
<h1>Resource Not Found</h1>
|
|
|
|
</div>
|
|
|
|
<div class="header-right">
|
|
|
|
<div id="timestamp">{{.Timestamp}}</div>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<content-body>
|
|
|
|
<section>
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<td style="height: 150px; font-size: 1.3em; color: black; font-weight: bold">
|
|
|
|
Unfortunately, the resource you were trying to access could not be found on swarm.
|
|
|
|
</td>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td class="key">
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="value">
|
2017-10-06 08:45:54 -05:00
|
|
|
{{.Msg}}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="key">
|
|
|
|
Error code:
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="value">
|
|
|
|
{{.Code}}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</section>
|
|
|
|
</content-body>
|
|
|
|
|
|
|
|
<footer>
|
|
|
|
<p>
|
|
|
|
Swarm: Serverless Hosting Incentivised Peer-To-Peer Storage And Content Distribution<br/>
|
|
|
|
<a href="http://swarm-gateways.net/bzz:/theswarm.eth">Swarm</a>
|
|
|
|
</p>
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|
|
|
|
`
|
|
|
|
return page
|
|
|
|
}
|
|
|
|
|
|
|
|
//This returns the HTML for a page listing disambiguation options
|
|
|
|
//i.e. if user requested bzz:/<hash>/read and the manifest contains "readme.md" and "readinglist.txt",
|
|
|
|
//this page is returned with a clickable list the existing disambiguation links in the manifest
|
|
|
|
func GetMultipleChoicesErrorPage() string {
|
|
|
|
page := `
|
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
|
|
|
<meta http-equiv="X-UA-Compatible" ww="chrome=1">
|
|
|
|
<meta name="description" content="Ethereum/Swarm multiple options page">
|
|
|
|
<meta property="og:url" content="https://swarm-gateways.net/bzz:/theswarm.eth">
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
body, div, header, footer {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
body {
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.container {
|
|
|
|
min-width: 100%;
|
|
|
|
min-height: 100%;
|
|
|
|
max-height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
header {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
background-color: #ffa500;
|
|
|
|
/* height: 20vh; */
|
|
|
|
padding: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.header-left, .header-right {
|
|
|
|
width: 20%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.header-left {
|
|
|
|
padding-left: 40px;
|
|
|
|
float: left;
|
|
|
|
}
|
|
|
|
|
|
|
|
.header-right {
|
|
|
|
padding-right: 40px;
|
|
|
|
float: right;
|
|
|
|
}
|
|
|
|
|
|
|
|
.page-title {
|
|
|
|
/* margin-top: 4.5vh; */
|
|
|
|
text-align: center;
|
|
|
|
float: left;
|
|
|
|
width: 60%;
|
|
|
|
color: white;
|
|
|
|
}
|
|
|
|
|
|
|
|
content-body {
|
|
|
|
display: block;
|
|
|
|
margin: 0 auto;
|
|
|
|
/* width: 50%; */
|
|
|
|
min-height: 60vh;
|
|
|
|
max-height: 60vh;
|
|
|
|
padding: 50px 20px;
|
|
|
|
opacity: 0.6;
|
|
|
|
background-color: #A9F5BF;
|
|
|
|
}
|
|
|
|
|
|
|
|
table {
|
|
|
|
font-size: 1.2em;
|
|
|
|
margin: 0 auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
tr {
|
|
|
|
height: 60px;
|
|
|
|
}
|
|
|
|
|
|
|
|
td {
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.key {
|
|
|
|
color: #111;
|
|
|
|
font-weight: bold;
|
|
|
|
width: 200px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.value {
|
|
|
|
color: red;
|
|
|
|
font-weight: bold
|
|
|
|
}
|
|
|
|
|
|
|
|
footer {
|
|
|
|
height: 20vh;
|
|
|
|
background-color: #ffa500;
|
|
|
|
font-size: 1em;
|
|
|
|
text-align: center;
|
|
|
|
padding: 20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<title>Swarm::HTTP Disambiguation Page</title>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div class="container">
|
|
|
|
|
|
|
|
<header>
|
|
|
|
<div class="header-left">
|
|
|
|
<img style="height:18vh;margin-left:40px" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACrCAYAAACE5WWRAAAABmJLR0QA/wD/AP+gvaeTAAAACXB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6wRAV+vhlwB+SDw5/GEy/dRzZpOtyixSH+8aFL1SYw8RChQdgazW7ebjbBMdMn3AZ8i02+iHMLFnTm+g6WqiAW5JnI8MXCkNgj3QQ+GK5zsEq4EPg6cQKP21U7gj4H78DHgauc68lPD1qwAfhP4mS7d2mxc4QvAJ8l0U8fnmszxCuATkeNhwrLUTuCDwLem5JiE1bXAzgfeC1wRcz6exuKuicHwBuC6pttGobnxKwaq9Rnk2YQ7b86Kr/oeCEui29sC3AXcTKZ+yjiwwfH1hNvHihyzmNfKLd89wGfw+kBHjklYUz1WPcZYB3wYOI9wx0y1JQiutbiqMeAB4MN43TytFbRmJArrrcCpTH1/4HTCqsS//wfgHjLd1XFyUfxd4PgXwM9HjkVOWQvnnOO/An+J16eTxZrO5RnCdHuxwGEWYXg/4aqSTnvIpzoMKsD1wHXAoY4juuEeBbgyWrDKLIQlwPeAT5Pp3uldu4BlBOV9wB9Ei9TuIVuF1fqdnwWunZLjURu857MgD1gZJeNtCH8PvJmplzf8NG7pQuBNwDgiz4Tb52m+CSzPgamC6hMgDyAsgbbnBluDdxsF8UPgM2T6VZTDbW+3t4U7Eo2MIvw6cAPwK9Nw1Gk4viEOhmaOCxzkSylE1XAJb45B+DoaWenp8kHTZdZzS/A48Am8bmifC8ur4NXjr5OB/xJdcB7vFC3WCPAM8DngYbJ42rldQO0kFvEA
|
|
|
|
</div>
|
|
|
|
<div class="page-title">
|
|
|
|
<h1>Swarm: disambiguation</h1>
|
|
|
|
</div>
|
|
|
|
<div class="header-right">
|
|
|
|
<div id="timestamp">{{.Timestamp}}</div>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<content-body>
|
|
|
|
<section>
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<td style="height: 150px; font-size: 1.3em; color: black; font-weight: bold">
|
|
|
|
Your request yields ambiguous results!
|
|
|
|
</td>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td class="key">
|
|
|
|
Your request may refer to:
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="value">
|
|
|
|
{{ .Details}}
|
2017-09-08 13:29:09 -05:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="key">
|
|
|
|
Error code:
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="value">
|
|
|
|
{{.Code}}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</section>
|
|
|
|
</content-body>
|
|
|
|
|
|
|
|
<footer>
|
|
|
|
<p>
|
|
|
|
Swarm: Serverless Hosting Incentivised Peer-To-Peer Storage And Content Distribution<br/>
|
|
|
|
<a href="http://swarm-gateways.net/bzz:/theswarm.eth">Swarm</a>
|
|
|
|
</p>
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|
|
|
|
`
|
|
|
|
return page
|
|
|
|
}
|