Skip to content

Commit

Permalink
*) Printout date and system name on proxy error page
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@581 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
theli committed Aug 23, 2005
1 parent 6c8b67d commit 858cb98
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions htroot/proxymsg/error.html
Expand Up @@ -73,6 +73,11 @@ <h2>Error with request: <font color="#556699">#[requestMethod]# #[requestURL]#</
</td>
</tr>
#(/printStackTrace)#
<tr><td><hr></td></tr>
<tr>
<td>Generated #[date]# by #[peerName]#.yacy
</td>
</tr>
</table>

</body>
Expand Down
8 changes: 7 additions & 1 deletion source/de/anomic/http/httpd.java
Expand Up @@ -61,6 +61,7 @@
import java.util.Properties;
import java.util.StringTokenizer;

import de.anomic.plasma.plasmaSwitchboard;
import de.anomic.server.serverByteBuffer;
import de.anomic.server.serverCodings;
import de.anomic.server.serverCore;
Expand Down Expand Up @@ -1152,6 +1153,11 @@ else if (httpVersion.equals("HTTP/1.1") && httpHeader.http1_1.containsKey(Intege
tp.put("printStackTrace",0);
}

// Generated Tue, 23 Aug 2005 11:19:14 GMT by brain.wg (squid/2.5.STABLE3)
// adding some system information
String systemDate = httpc.dateString(httpc.nowDate());
tp.put("date",systemDate);

// rewrite the file
File htRootPath = new File(switchboard.getRootPath(), switchboard.getConfig("htRootPath","htroot"));

Expand All @@ -1165,7 +1171,7 @@ else if (httpVersion.equals("HTTP/1.1") && httpHeader.http1_1.containsKey(Intege
o.close(); o = null;

httpHeader header = new httpHeader();
header.put(httpHeader.DATE, httpc.dateString(httpc.nowDate()));
header.put(httpHeader.DATE, systemDate);
header.put(httpHeader.CONTENT_TYPE, "text/html");
header.put(httpHeader.CONTENT_LENGTH, Integer.toString(result.length));
header.put(httpHeader.PRAGMA, "no-cache");
Expand Down

0 comments on commit 858cb98

Please sign in to comment.