mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:32:46 +00:00 
			
		
		
		
	WebServer: Convert document_root_path from DeprecatedString to String
This commit is contained in:
		
							parent
							
								
									e795641d99
								
							
						
					
					
						commit
						f0586d74d7
					
				
					 3 changed files with 5 additions and 5 deletions
				
			
		|  | @ -11,7 +11,7 @@ namespace WebServer { | |||
| 
 | ||||
| static Configuration* s_configuration = nullptr; | ||||
| 
 | ||||
| Configuration::Configuration(DeprecatedString document_root_path, Optional<HTTP::HttpRequest::BasicAuthenticationCredentials> credentials) | ||||
| Configuration::Configuration(String document_root_path, Optional<HTTP::HttpRequest::BasicAuthenticationCredentials> credentials) | ||||
|     : m_document_root_path(move(document_root_path)) | ||||
|     , m_credentials(move(credentials)) | ||||
| { | ||||
|  |  | |||
|  | @ -15,15 +15,15 @@ namespace WebServer { | |||
| 
 | ||||
| class Configuration { | ||||
| public: | ||||
|     Configuration(DeprecatedString document_root_path, Optional<HTTP::HttpRequest::BasicAuthenticationCredentials> credentials = {}); | ||||
|     Configuration(String document_root_path, Optional<HTTP::HttpRequest::BasicAuthenticationCredentials> credentials = {}); | ||||
| 
 | ||||
|     DeprecatedString const& document_root_path() const { return m_document_root_path; } | ||||
|     String const& document_root_path() const { return m_document_root_path; } | ||||
|     Optional<HTTP::HttpRequest::BasicAuthenticationCredentials> const& credentials() const { return m_credentials; } | ||||
| 
 | ||||
|     static Configuration const& the(); | ||||
| 
 | ||||
| private: | ||||
|     DeprecatedString m_document_root_path; | ||||
|     String m_document_root_path; | ||||
|     Optional<HTTP::HttpRequest::BasicAuthenticationCredentials> m_credentials; | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
|  | @ -68,7 +68,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | |||
|     if (!username.is_empty() && !password.is_empty()) | ||||
|         credentials = HTTP::HttpRequest::BasicAuthenticationCredentials { username, password }; | ||||
| 
 | ||||
|     WebServer::Configuration configuration(real_document_root_path.to_deprecated_string(), credentials); | ||||
|     WebServer::Configuration configuration(real_document_root_path, credentials); | ||||
| 
 | ||||
|     Core::EventLoop loop; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ben Wiederhake
						Ben Wiederhake