From 8932c0586047c348c2287a28d5510bacc86cb156 Mon Sep 17 00:00:00 2001 From: uwaa Date: Sun, 15 Dec 2024 08:02:08 +0000 Subject: [PATCH] http: add referrer --- HTTP/HttpFields.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/HTTP/HttpFields.cs b/HTTP/HttpFields.cs index b6747a6..54f44f1 100644 --- a/HTTP/HttpFields.cs +++ b/HTTP/HttpFields.cs @@ -25,6 +25,8 @@ public record HttpFields public string? Location { get; set; } + public string? Referrer { get; set; } + public int? ContentLength { get; set; } public MIMEType? ContentType { get; set; } @@ -86,6 +88,11 @@ public record HttpFields Location = value; return; + case "referer": + case "referrer": + Referrer = value; + return; + case "content-length": { if (value == null) @@ -153,6 +160,9 @@ public record HttpFields if (Location != null) callback("Location", Location); + if (Referrer != null) + callback("Referer", Referrer); + if (WebSocketKey != null) callback("Sec-WebSocket-Key", WebSocketKey);