summaryrefslogtreecommitdiff
path: root/Userland/Services/RequestServer
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Services/RequestServer')
-rw-r--r--Userland/Services/RequestServer/GeminiRequest.h2
-rw-r--r--Userland/Services/RequestServer/HttpRequest.h2
-rw-r--r--Userland/Services/RequestServer/HttpsRequest.h2
-rw-r--r--Userland/Services/RequestServer/Request.h3
4 files changed, 7 insertions, 2 deletions
diff --git a/Userland/Services/RequestServer/GeminiRequest.h b/Userland/Services/RequestServer/GeminiRequest.h
index c481da653d..0d9ffe4801 100644
--- a/Userland/Services/RequestServer/GeminiRequest.h
+++ b/Userland/Services/RequestServer/GeminiRequest.h
@@ -20,6 +20,8 @@ public:
Gemini::GeminiJob const& job() const { return *m_job; }
+ virtual URL url() const override { return m_job->url(); }
+
private:
explicit GeminiRequest(ClientConnection&, NonnullRefPtr<Gemini::GeminiJob>, NonnullOwnPtr<OutputFileStream>&&);
diff --git a/Userland/Services/RequestServer/HttpRequest.h b/Userland/Services/RequestServer/HttpRequest.h
index d2968061c1..3ef9bb206b 100644
--- a/Userland/Services/RequestServer/HttpRequest.h
+++ b/Userland/Services/RequestServer/HttpRequest.h
@@ -22,6 +22,8 @@ public:
HTTP::HttpJob& job() { return m_job; }
HTTP::HttpJob const& job() const { return m_job; }
+ virtual URL url() const override { return m_job->url(); }
+
private:
explicit HttpRequest(ClientConnection&, NonnullRefPtr<HTTP::HttpJob>, NonnullOwnPtr<OutputFileStream>&&);
diff --git a/Userland/Services/RequestServer/HttpsRequest.h b/Userland/Services/RequestServer/HttpsRequest.h
index 2f26b0d6fe..51187368dd 100644
--- a/Userland/Services/RequestServer/HttpsRequest.h
+++ b/Userland/Services/RequestServer/HttpsRequest.h
@@ -21,6 +21,8 @@ public:
HTTP::HttpsJob& job() { return m_job; }
HTTP::HttpsJob const& job() const { return m_job; }
+ virtual URL url() const override { return m_job->url(); }
+
private:
explicit HttpsRequest(ClientConnection&, NonnullRefPtr<HTTP::HttpsJob>, NonnullOwnPtr<OutputFileStream>&&);
diff --git a/Userland/Services/RequestServer/Request.h b/Userland/Services/RequestServer/Request.h
index 324f027c93..9e83e047ed 100644
--- a/Userland/Services/RequestServer/Request.h
+++ b/Userland/Services/RequestServer/Request.h
@@ -21,7 +21,7 @@ public:
virtual ~Request();
i32 id() const { return m_id; }
- URL url() const { return m_url; }
+ virtual URL url() const = 0;
Optional<u32> status_code() const { return m_status_code; }
Optional<u32> total_size() const { return m_total_size; }
@@ -50,7 +50,6 @@ private:
ClientConnection& m_client;
i32 m_id { 0 };
int m_request_fd { -1 }; // Passed to client.
- URL m_url;
Optional<u32> m_status_code;
Optional<u32> m_total_size {};
size_t m_downloaded_size { 0 };