Commit 929a4dc2 authored by Tres Seaver's avatar Tres Seaver

Forward port fix for collector #1957 from 2.8 branch.

parent 0226f6f2
...@@ -599,42 +599,43 @@ class HTTPResponse(BaseResponse): ...@@ -599,42 +599,43 @@ class HTTPResponse(BaseResponse):
def _error_html(self,title,body): def _error_html(self,title,body):
# XXX could this try to use standard_error_message somehow? # XXX could this try to use standard_error_message somehow?
return ("""\ return ("""\
<TABLE BORDER="0" WIDTH="100%"> <table border="0" width="100%">
<TR VALIGN="TOP"> <tr valign="top">
<TD WIDTH="10%" ALIGN="CENTER"> <td width="10%" align="center">
&nbsp; &nbsp;
</TD> </td>
<TD WIDTH="90%"> <td width="90%">
<H2>Site Error</H2> <h2>Site Error</h2>
<P>An error was encountered while publishing this resource. <p>An error was encountered while publishing this resource.
</P>""" + \ </p>""" + \
""" """
<P><STRONG>%s</STRONG></P> <p><strong>%s</strong></p>
%s""" %(title,body) + \ %s""" %(title,body) + \
""" """
<HR NOSHADE> <hr noshade="noshade"/>
<P>Troubleshooting Suggestions</P> <p>Troubleshooting Suggestions</p>
<UL> <ul>
<LI>The URL may be incorrect.</LI> <li>The URL may be incorrect.</li>
<LI>The parameters passed to this resource may be incorrect.</LI> <li>The parameters passed to this resource may be incorrect.</li>
<LI>A resource that this resource relies on may be <li>A resource that this resource relies on may be
encountering an error.</LI> encountering an error.</li>
</UL> </ul>
<P>For more detailed information about the error, please <p>For more detailed information about the error, please
refer to error log. refer to error log.
</P> </p>
<P>If the error persists please contact the site maintainer. <p>If the error persists please contact the site maintainer.
Thank you for your patience. Thank you for your patience.
</P> </p>
</TD></TR> </td></tr>
</TABLE>""") </table>""")
def notFoundError(self,entry='Unknown'): def notFoundError(self,entry='Unknown'):
self.setStatus(404) self.setStatus(404)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment