Một response có thể có nhiều dòng Set-Cookie, mỗi dòng dạng name=value; <thuộc tính...>. Ta chỉ lấy cặp name=value đầu tiên của mỗi dòng để tạo Cookie header cho request kế tiếp.
Cho dòng 1 là số dòng N, rồi N dòng Set-Cookie. In ra Cookie header dạng n1=v1; n2=v2; ... (theo thứ tự xuất hiện).
Input:
2
sid=abc; Path=/; HttpOnly
theme=dark; Max-Age=3600
Output: sid=abc; theme=dark
Dòng 1: N. N dòng Set-Cookie.
1 ≤ N ≤ 100.
Cookie header ghép từ cặp name=value đầu mỗi dòng.
Ví dụ:
Đầu vào:
2
sid=abc; Path=/; HttpOnly
theme=dark; Max-Age=3600
Đầu ra:
sid=abc; theme=dark
Giải thích:
Đang tải editor...