Added request headers to 500 page
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by visionmedia · committed by visionmedia · parent 4e567d4 · Browse files · 2 files·+22 added−3 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+22 added−3 removed
- other:+22 added−3 removed
Provenance
- Commit
ae904e4- Tree
d64379b- Author
visionmedia <tj@vision-media.ca>- Committer
visionmedia <tj@vision-media.ca>- Parent
4e567d4
2 files changed+22 added−3 removed
modified:lib/express/pages/show-exceptions.js+8 added-1 removed
11 unmodified lines121314151616171819202122234 unmodified lines28293031323334353637383911 unmodified lines return '<li>' + val .replace(/\(([^:]+)/, '(<span class="path">$1</span>') .replace(/(:\d+:\d+)/, '<span class="line">$1</span>') + '</li>' }).toArray().join('\n') }).join('\n') var requestHeaders = $(request.headers).map(function(val, key){ return '<tr><td>' + key + ':</td><td>' + val + '</td></tr>' }).join('\n') return '<html> \n\ <head> \n\ <title>Express -- ' + e + '</title> \n\ ' + style + ' \n\4 unmodified lines <h2><em>500</em> ' + e + '</h2> \n\ <ul id="stacktrace"> \n\ ' + stack + ' \n\ </ul> \n\ <h3>Request Headers</h3> \n\ <table id="request-headers"> \n\ ' + requestHeaders + ' \n\ </table> \n\ </div> \n\ </body> \n\ </html>'}No newline at end of fileNo newline at end of filemodified:lib/express/pages/style.js+14 added-2 removed
7 unmodified lines8910111212131415164 unmodified lines21222324252627282930313227333435363736 unmodified lines7475767778798081828384857 unmodified lines text-align: center; \n\ -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1); \n\ color: #555; \n\ } \n\ h1, h2 { \n\ h1, h2, h3 { \n\ margin: 0; \n\ font-size: 22px; \n\ color: #343434; \n\ } \n\4 unmodified lines h1 { \n\ text-shadow: 1px 2px 2px #ddd; \n\ font-size: 60px; \n\ } \n\ h3 { \n\ margin: 15px 0 10px 0; \n\ padding-bottom: 5px; \n\ border-bottom: 1px solid #eee; \n\ font-size: 18px; \n\ } \n\ #wrapper { \n\ margin: 50px auto; \n\ width: 500px; \n\ width: 750px; \n\ text-align: left; \n\ } \n\ ul { \n\ margin: 0; \n\36 unmodified lines -moz-border-radius: 10px; \n\ -webkit-box-shadow: 1px 1px 6px #ddd; \n\ -moz-box-shadow: 1px 1px 6px #ddd; \n\ } \n\ table td { \n\ font-size: 14px; \n\ } \n\ table td:first-child { \n\ color: #343434; \n\ } \n\ </style> \n\ 'No newline at end of fileNo newline at end of file