| 
									
										
										
										
											2014-04-26 09:18:56 +00:00
										 |  |  | package StaticFiles | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-19 17:19:11 +00:00
										 |  |  | import ( | 
					
						
							|  |  |  | 	"github.com/SommerEngineering/Ocean/Shutdown" | 
					
						
							|  |  |  | 	"net/http" | 
					
						
							|  |  |  | ) | 
					
						
							| 
									
										
										
										
											2014-04-26 09:18:56 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | func HandlerMapStaticFiles2Root(response http.ResponseWriter, request *http.Request) { | 
					
						
							|  |  |  | 	if Shutdown.IsDown() { | 
					
						
							|  |  |  | 		http.NotFound(response, request) | 
					
						
							|  |  |  | 		return | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	if request.RequestURI == `/` { | 
					
						
							|  |  |  | 		request.RequestURI = `/staticFiles/` + startFile4Map2Root | 
					
						
							|  |  |  | 	} else { | 
					
						
							|  |  |  | 		request.RequestURI = `/staticFiles` + request.RequestURI | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	HandlerStaticFiles(response, request) | 
					
						
							|  |  |  | } |