Skip to content

Commit

Permalink
src/common: drop two CockpitWebRequest methods
Browse files Browse the repository at this point in the history
Nothing uses those anymore.

Closes #20000
  • Loading branch information
allisonkarlitskaya committed Oct 7, 2024
1 parent 2e30308 commit 6aca5dc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
20 changes: 0 additions & 20 deletions src/common/cockpitwebserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1257,12 +1257,6 @@ cockpit_web_request_respond (CockpitWebRequest *self)
self->method, cockpit_web_request_get_protocol (self));
}

const gchar *
cockpit_web_request_get_original_path (CockpitWebRequest *self)
{
return self->original_path;
}

const gchar *
cockpit_web_request_get_path (CockpitWebRequest *self)
{
Expand Down Expand Up @@ -1406,17 +1400,3 @@ cockpit_web_request_get_client_certificate (CockpitWebRequest *self)
cockpit_json_get_string (metadata, "client-certificate", NULL, &client_certificate);
return client_certificate;
}

gboolean
cockpit_web_request_accepts_encoding (CockpitWebRequest *self,
const gchar *encoding)
{
const gchar *accept = g_hash_table_lookup (self->headers, "Accept-Encoding");
if (!accept)
return TRUE;
g_auto(GStrv) encodings = cockpit_web_server_parse_accept_list (accept, NULL);
return g_strv_contains ((const gchar **) encodings, encoding) ||
g_strv_contains ((const gchar **) encodings, "*");
}

/* ---------------------------------------------------------------------------------------------------- */
7 changes: 0 additions & 7 deletions src/common/cockpitwebserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ cockpit_web_request_get_type (void);
CockpitWebResponse *
cockpit_web_request_respond (CockpitWebRequest *self);

const gchar *
cockpit_web_request_get_original_path (CockpitWebRequest *self);

const gchar *
cockpit_web_request_get_path (CockpitWebRequest *self);

Expand Down Expand Up @@ -79,10 +76,6 @@ cockpit_web_request_get_remote_address (CockpitWebRequest *self);
const gchar *
cockpit_web_request_get_client_certificate (CockpitWebRequest *self);

gboolean
cockpit_web_request_accepts_encoding (CockpitWebRequest *self,
const gchar *encoding);

#define COCKPIT_TYPE_WEB_SERVER (cockpit_web_server_get_type ())
G_DECLARE_FINAL_TYPE(CockpitWebServer, cockpit_web_server, COCKPIT, WEB_SERVER, GObject)

Expand Down

0 comments on commit 6aca5dc

Please sign in to comment.