mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:12:45 +00:00 
			
		
		
		
	 1682f0b760
			
		
	
	
		1682f0b760
		
	
	
	
	
		
			
			SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
		
			
				
	
	
		
			27 lines
		
	
	
	
		
			561 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
	
		
			561 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Tim Flynn <trflynn89@pm.me>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include "LoadRequest.h"
 | |
| #include <LibWeb/Cookie/Cookie.h>
 | |
| #include <LibWeb/Page/Page.h>
 | |
| 
 | |
| namespace Web {
 | |
| 
 | |
| LoadRequest LoadRequest::create_for_url_on_page(const URL& url, Page* page)
 | |
| {
 | |
|     LoadRequest request;
 | |
|     request.set_url(url);
 | |
| 
 | |
|     if (page) {
 | |
|         String cookie = page->client().page_did_request_cookie(url, Cookie::Source::Http);
 | |
|         if (!cookie.is_empty())
 | |
|             request.set_header("Cookie", cookie);
 | |
|     }
 | |
| 
 | |
|     return request;
 | |
| }
 | |
| 
 | |
| }
 |