summaryrefslogtreecommitdiff
path: root/libsoup/soup-message.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2012-12-13 16:07:57 +0100
committerDan Winship <danw@gnome.org>2012-12-17 16:09:50 -0500
commit89dd1240a6077b18f6d6e4b119b403de38b73141 (patch)
tree3787b2557c6c2e720ea33e6650c798377213bea4 /libsoup/soup-message.c
parenta11304268326e26317883309e10af92935efd663 (diff)
downloadlibsoup-89dd1240a6077b18f6d6e4b119b403de38b73141.tar.gz
Rename all remaining "SoupMessage *req"s to "msg"
Originally (ie, 12 years ago last week) the HTTP message type in soup was called SoupRequest, and most SoupRequest variables were called "req". Shortly after, SoupRequest was renamed to SoupMessage, but none of the existing "req"s were renamed, and in fact, new ones kept getting added. Eventually, "msg" became the standard name for a SoupMessage variable, but a handful of "req"s have managed to survive to this day. With the increasing integration of the modern-day SoupRequest, this has gone from "inconsistent" to "confusing", so fix all the remaining stray "SoupMessage *req"s.
Diffstat (limited to 'libsoup/soup-message.c')
-rw-r--r--libsoup/soup-message.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/libsoup/soup-message.c b/libsoup/soup-message.c
index 5362fc6d..6c62b27d 100644
--- a/libsoup/soup-message.c
+++ b/libsoup/soup-message.c
@@ -302,12 +302,12 @@ soup_message_get_property (GObject *object, guint prop_id,
}
static void
-soup_message_real_got_body (SoupMessage *req)
+soup_message_real_got_body (SoupMessage *msg)
{
- SoupMessagePrivate *priv = SOUP_MESSAGE_GET_PRIVATE (req);
+ SoupMessagePrivate *priv = SOUP_MESSAGE_GET_PRIVATE (msg);
SoupMessageBody *body;
- body = priv->server_side ? req->request_body : req->response_body;
+ body = priv->server_side ? msg->request_body : msg->response_body;
if (soup_message_body_get_accumulate (body)) {
SoupBuffer *buffer;
@@ -1262,39 +1262,39 @@ soup_message_get_proxy_auth (SoupMessage *msg)
/**
* soup_message_cleanup_response:
- * @req: a #SoupMessage
+ * @msg: a #SoupMessage
*
- * Cleans up all response data on @req, so that the request can be sent
+ * Cleans up all response data on @msg, so that the request can be sent
* again and receive a new response. (Eg, as a result of a redirect or
* authorization request.)
**/
void
-soup_message_cleanup_response (SoupMessage *req)
+soup_message_cleanup_response (SoupMessage *msg)
{
- SoupMessagePrivate *priv = SOUP_MESSAGE_GET_PRIVATE (req);
+ SoupMessagePrivate *priv = SOUP_MESSAGE_GET_PRIVATE (msg);
- soup_message_body_truncate (req->response_body);
- soup_message_headers_clear (req->response_headers);
+ soup_message_body_truncate (msg->response_body);
+ soup_message_headers_clear (msg->response_headers);
if (priv->server_side) {
- soup_message_headers_set_encoding (req->response_headers,
+ soup_message_headers_set_encoding (msg->response_headers,
SOUP_ENCODING_CONTENT_LENGTH);
}
priv->msg_flags &= ~SOUP_MESSAGE_CONTENT_DECODED;
- req->status_code = SOUP_STATUS_NONE;
- if (req->reason_phrase) {
- g_free (req->reason_phrase);
- req->reason_phrase = NULL;
+ msg->status_code = SOUP_STATUS_NONE;
+ if (msg->reason_phrase) {
+ g_free (msg->reason_phrase);
+ msg->reason_phrase = NULL;
}
priv->http_version = priv->orig_http_version;
- g_object_notify (G_OBJECT (req), SOUP_MESSAGE_STATUS_CODE);
- g_object_notify (G_OBJECT (req), SOUP_MESSAGE_REASON_PHRASE);
- g_object_notify (G_OBJECT (req), SOUP_MESSAGE_HTTP_VERSION);
- g_object_notify (G_OBJECT (req), SOUP_MESSAGE_FLAGS);
- g_object_notify (G_OBJECT (req), SOUP_MESSAGE_TLS_CERTIFICATE);
- g_object_notify (G_OBJECT (req), SOUP_MESSAGE_TLS_ERRORS);
+ g_object_notify (G_OBJECT (msg), SOUP_MESSAGE_STATUS_CODE);
+ g_object_notify (G_OBJECT (msg), SOUP_MESSAGE_REASON_PHRASE);
+ g_object_notify (G_OBJECT (msg), SOUP_MESSAGE_HTTP_VERSION);
+ g_object_notify (G_OBJECT (msg), SOUP_MESSAGE_FLAGS);
+ g_object_notify (G_OBJECT (msg), SOUP_MESSAGE_TLS_CERTIFICATE);
+ g_object_notify (G_OBJECT (msg), SOUP_MESSAGE_TLS_ERRORS);
}
/**