- major update: app.js: rewrite socket handling to stream data (fix issues POSTing with shoddy dialup, namely fix wtv-update:/sync issues)
- update: wtv-home:/home: remove broken irc test, add links to DiskHax and VFatHax, remove URL Accessor form from MiniBrowser because it doesn't work
- update: wtv-update:/sync: skip file if the Content-length matches the client and the client file is equal or newer, since client is not storing wtv-checksum for some reason. Client file time is set to when the client received the file last, and not actually when the file was modified on our end
- update: wtv-head-waiter:/login-stage-two: offer prompt to minibrowser to go to home or willie
- fix: clean up socket session data on socket error
- code fixup: use `${}` instead of escaping string
- app.js: better minibrowser session cleanup
- update: http(s) proxy: do not send internal 'wtv-connection-close' header to client
- fix: http(s) proxy: handle socks HostUnreachable error
- fix: wtv-head-waiter:/login-stage-two: usernames longerfix: build 3833 crashes when `wtv-user-name` is too long
- fix: wtv-log:/log
- add: wtv-chat
- add: wtv-setup
140 lines
5.5 KiB
JavaScript
140 lines
5.5 KiB
JavaScript
var error = '';
|
|
if (request_headers.query.error) {
|
|
switch (request_headers.query.error) {
|
|
case "1":
|
|
error = "uncompression failed";
|
|
break;
|
|
case "2":
|
|
error = "upgrade write failed";
|
|
break;
|
|
case "3":
|
|
error = "signature verification failed";
|
|
break;
|
|
case "4":
|
|
error = "cannot upgrade bootstrap";
|
|
break;
|
|
case "5":
|
|
error = "out of memory";
|
|
break;
|
|
case "-7":
|
|
error = "response error";
|
|
break;
|
|
case "-20":
|
|
error = "timed out";
|
|
break;
|
|
case "99":
|
|
error = "test code";
|
|
break;
|
|
default:
|
|
error = "unknown error";
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
var try_again_url = 'wtv-flashrom:/willie';
|
|
var try_again_url_path = ''
|
|
var try_again_url_start_time = parseInt(new Date().toUTCString()) / 1000;
|
|
|
|
headers = `200 OK
|
|
Content-type: text/html`
|
|
|
|
|
|
data = `<html>
|
|
<head>
|
|
<display switchtowebmode nooptions nostatus skipback clearback>
|
|
<title>Update failed</title>
|
|
</head>
|
|
|
|
<body noscroll bgcolor="#191919" text="#42CC55" link="36d5ff"
|
|
hspace=0 vspace=0 transition=none fontsize="large">
|
|
<table cellspacing=0 cellpadding=0>
|
|
<tr>
|
|
<td width=104 height=74 valign=middle align=center bgcolor="3B3A4D">
|
|
<img src="${minisrv_config.config.service_logo}" width=87 height=67>
|
|
<td width=20 valign=top align=left bgcolor="3B3A4D">
|
|
<img src="wtv-flashrom:/ROMCache/Spacer.gif" width=1 height=1>
|
|
<td colspan=10 width=436 valign=middle align=left bgcolor="3B3A4D">
|
|
<font color="D6DFD0" size="+2">
|
|
<blackface>
|
|
<shadow>
|
|
<img src="wtv-flashrom:/ROMCache/Spacer.gif" width=1 height=4>
|
|
<br>
|
|
Updating failed
|
|
</shadow>
|
|
</blackface>
|
|
</font>
|
|
<tr>
|
|
<td colspan=12 width=560 height=10 valign=top align=left>
|
|
<img src="wtv-flashrom:/ROMCache/S40H1.gif" width=560 height=6>
|
|
<tr>
|
|
<td width=104 height=10 valign=top align=left>
|
|
<td width=20 valign=top align=left>
|
|
<td width=67 valign=top align=left>
|
|
<td width=20 valign=top align=left>
|
|
<td width=67 valign=top align=left>
|
|
<td width=20 valign=top align=left>
|
|
<td width=67 valign=top align=left>
|
|
<td width=20 valign=top align=left>
|
|
<td width=67 valign=top align=left>
|
|
<td width=20 valign=top align=left>
|
|
<td width=68 valign=top align=left>
|
|
<td width=20 valign=top align=left>
|
|
|
|
<form action="${try_again_url}">
|
|
<input type="hidden" name="clear_cache" value="true">
|
|
<tr>
|
|
<td width=104 valign=middle align=center>
|
|
<td width=20 valign=middle align=center>
|
|
<td colspan=9 width=100 height=258 valign=top align=left>
|
|
<font size=+1>
|
|
We ran into a technical problem while updating
|
|
your unit. (Error: ${error})
|
|
Choose <b>Try Again</b> to try again now.
|
|
<p><font size=+1>Press the <b>power</b> button to switch off your unit.
|
|
<tr>
|
|
<td width=104 valign=middle align=center>
|
|
<td width=20 valign=middle align=center>
|
|
<td colspan=10 height=2 valign=middle align=center bgcolor="2B2B2B">
|
|
<img src="wtv-flashrom:/ROMCache/Spacer.gif" width=436 height=1>
|
|
<tr>
|
|
<td width=104 valign=middle align=center>
|
|
<td width=20 valign=middle align=center>
|
|
<td colspan=9 height=1 valign=top align=left>
|
|
<tr>
|
|
<td width=104 valign=middle align=center>
|
|
<td width=20 valign=middle align=center>
|
|
<td colspan=10 height=2 valign=top align=left bgcolor="0D0D0D">
|
|
<img src="wtv-flashrom:/ROMCache/Spacer.gif" width=436 height=1>
|
|
<tr>
|
|
<td width=104 valign=middle align=center>
|
|
<td width=20 valign=middle align=center>
|
|
<td colspan=9 height=4 valign=top align=left>
|
|
<tr>
|
|
<td width=104 valign=middle align=center>
|
|
<td width=20 valign=middle align=center>
|
|
<td colspan=9 width=416 valign=top align=left>
|
|
<table cellspacing=0 cellpadding=0>
|
|
<tr>
|
|
<td width=306 valign=top align=left>
|
|
<font size="-1">
|
|
<i>
|
|
</i>
|
|
</font>
|
|
<td width=112 valign=top align=right>
|
|
<font size="-1" color="#E7CE4A">
|
|
<shadow>
|
|
<input selected
|
|
name="Try Again"
|
|
value="Try Again"
|
|
type=submit Value=TryAgain name="Try Again"
|
|
borderimage="file://ROM/Borders/ButtonBorder2.bif" usestyle width=110>
|
|
</shadow>
|
|
</font>
|
|
</form>
|
|
|
|
</table>
|
|
<td width=20 valign=middle align=center>
|
|
</table>
|
|
</body>
|
|
</html>`; |