##// END OF EJS Templates
rethrow upstream HTTP errors...
Min RK -
Show More
@@ -1,16 +1,9 b''
1 1 """PostProcessor for serving reveal.js HTML slideshows."""
2 from __future__ import print_function
3 #-----------------------------------------------------------------------------
4 #Copyright (c) 2013, the IPython Development Team.
5 #
6 #Distributed under the terms of the Modified BSD License.
7 #
8 #The full license is in the file COPYING.txt, distributed with this software.
9 #-----------------------------------------------------------------------------
10 2
11 #-----------------------------------------------------------------------------
12 # Imports
13 #-----------------------------------------------------------------------------
3 # Copyright (c) IPython Development Team.
4 # Distributed under the terms of the Modified BSD License.
5
6 from __future__ import print_function
14 7
15 8 import os
16 9 import webbrowser
@@ -22,9 +15,6 b' from IPython.utils.traitlets import Bool, Unicode, Int'
22 15
23 16 from .base import PostProcessorBase
24 17
25 #-----------------------------------------------------------------------------
26 # Classes
27 #-----------------------------------------------------------------------------
28 18
29 19 class ProxyHandler(web.RequestHandler):
30 20 """handler the proxies requests from a local prefix to a CDN"""
@@ -37,12 +27,15 b' class ProxyHandler(web.RequestHandler):'
37 27
38 28 def finish_get(self, response):
39 29 """finish the request"""
40 # copy potentially relevant headers
30 # rethrow errors
31 response.rethrow()
32
41 33 for header in ["Content-Type", "Cache-Control", "Date", "Last-Modified", "Expires"]:
42 34 if header in response.headers:
43 35 self.set_header(header, response.headers[header])
44 36 self.finish(response.body)
45 37
38
46 39 class ServePostProcessor(PostProcessorBase):
47 40 """Post processor designed to serve files
48 41
General Comments 0
You need to be logged in to leave comments. Login now