v0.1.2
This commit is contained in:
		
							parent
							
								
									d6eb46d310
								
							
						
					
					
						commit
						ac669ba504
					
				
					 3 changed files with 7 additions and 1 deletions
				
			
		| 
						 | 
					@ -1,3 +1,8 @@
 | 
				
			||||||
 | 
					# 0.1.2 Fourth Pre-Release
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Fixed bug with mapping / to index.html
 | 
				
			||||||
 | 
					- Addex Origin-Server header
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# 0.1.1 Third Pre-Release
 | 
					# 0.1.1 Third Pre-Release
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Add mappings for common MIME types
 | 
					- Add mappings for common MIME types
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,7 +7,7 @@ private:
 | 
				
			||||||
  string file_dir;
 | 
					  string file_dir;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  unique_ptr<http_response> handle_request_cache(http_request& req) {
 | 
					  unique_ptr<http_response> handle_request_cache(http_request& req) {
 | 
				
			||||||
     string filename = req.path() == "/" ? "index.html" : req.path();
 | 
					     string filename = req.path() == "/" ? "/index.html" : req.path();
 | 
				
			||||||
     filename = file_dir + filename;
 | 
					     filename = file_dir + filename;
 | 
				
			||||||
     auto file_info = file_cache.find(filename);
 | 
					     auto file_info = file_cache.find(filename);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -438,6 +438,7 @@ public:
 | 
				
			||||||
        add_header(http_header("Content-Type", content_type), false);
 | 
					        add_header(http_header("Content-Type", content_type), false);
 | 
				
			||||||
        add_header(http_header("Content-Length", ::to_string(_content.length())), false);
 | 
					        add_header(http_header("Content-Length", ::to_string(_content.length())), false);
 | 
				
			||||||
        add_header(http_header("Server", "Anthracite/0.0.1"), false);
 | 
					        add_header(http_header("Server", "Anthracite/0.0.1"), false);
 | 
				
			||||||
 | 
					        add_header(http_header("Origin-Server", "Anthracite/0.0.1"), false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        for (auto header : _headers) {
 | 
					        for (auto header : _headers) {
 | 
				
			||||||
            response += header.second.to_string();
 | 
					            response += header.second.to_string();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue