2008-03-29 Dan Winship <danw@gnome.org>
+ * libsoup/soup-message.h (SoupMessage): de-constify
+ msg->reason_phrase; it's no more const than any other struct
+ field.
+
+ * libsoup/soup-message.c (finalize)
+ (soup_message_cleanup_response, soup_message_set_status)
+ (soup_message_set_status_full): don't need to cast reason_phase to
+ non-const when freeing it now
+
+ * libsoup/soup-message-client-io.c (parse_response_headers):
+ Likewise, remove reason-phrase non-const casts
+
+2008-03-29 Dan Winship <danw@gnome.org>
+
* libsoup/soup-date.c (parse_day): fix the test for no-day-parsed
(parse_year): likewise fix the test for no-year-parsed
(parse_time): don't accept empty components here
SoupMessagePrivate *priv = SOUP_MESSAGE_GET_PRIVATE (req);
SoupHTTPVersion version;
- g_free((char*)req->reason_phrase);
+ g_free(req->reason_phrase);
req->reason_phrase = NULL;
if (!soup_headers_parse_response (headers, headers_len,
req->response_headers,
&version,
&req->status_code,
- (char **) &req->reason_phrase))
+ &req->reason_phrase))
return SOUP_STATUS_MALFORMED;
g_object_notify (G_OBJECT (req), SOUP_MESSAGE_STATUS_CODE);
soup_message_body_free (msg->response_body);
soup_message_headers_free (msg->response_headers);
- g_free ((char *) msg->reason_phrase);
+ g_free (msg->reason_phrase);
G_OBJECT_CLASS (soup_message_parent_class)->finalize (object);
}
req->status_code = SOUP_STATUS_NONE;
if (req->reason_phrase) {
- g_free ((char *) req->reason_phrase);
+ g_free (req->reason_phrase);
req->reason_phrase = NULL;
}
priv->http_version = priv->orig_http_version;
g_return_if_fail (SOUP_IS_MESSAGE (msg));
g_return_if_fail (status_code != 0);
- g_free ((char *) msg->reason_phrase);
+ g_free (msg->reason_phrase);
msg->status_code = status_code;
msg->reason_phrase = g_strdup (soup_status_get_phrase (status_code));
g_return_if_fail (status_code != 0);
g_return_if_fail (reason_phrase != NULL);
- g_free ((char *) msg->reason_phrase);
+ g_free (msg->reason_phrase);
msg->status_code = status_code;
msg->reason_phrase = g_strdup (reason_phrase);
const char *method;
guint status_code;
- const char *reason_phrase;
+ char *reason_phrase;
SoupMessageBody *request_body;
SoupMessageHeaders *request_headers;