cmd/stepd: Get content-type information from front matter
This commit is contained in:
		
							parent
							
								
									5b88d13052
								
							
						
					
					
						commit
						ed1cdf4e89
					
				@ -81,9 +81,8 @@ func (this *handler) serveFile (res http.ResponseWriter, req *http.Request, file
 | 
				
			|||||||
		this.serveError(res, req, http.StatusInternalServerError, err)
 | 
							this.serveError(res, req, http.StatusInternalServerError, err)
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if document.ContentType != "" {
 | 
						if contentType, ok := document.FrontMatter["content-type"]; ok {
 | 
				
			||||||
		log.Println(document.ContentType)
 | 
							res.Header().Set("Content-Type", contentType)
 | 
				
			||||||
		res.Header().Set("Content-Type", document.ContentType)
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	data := step.HTTPData { }
 | 
						data := step.HTTPData { }
 | 
				
			||||||
	data.Res.Header      = make(http.Header)
 | 
						data.Res.Header      = make(http.Header)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user