summaryrefslogtreecommitdiff
path: root/libsoup/soup-message.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2008-09-24 12:17:55 +0000
committerDan Winship <danw@src.gnome.org>2008-09-24 12:17:55 +0000
commit95e15f6a0f8b0c41404391051de38b01f844cf25 (patch)
treead5af4c9b265ac0b19963d564fa5ea2bcf9e2c00 /libsoup/soup-message.c
parent693e3ebdf5a65a5e753d4669d2814ec1d4cbc07b (diff)
downloadlibsoup-95e15f6a0f8b0c41404391051de38b01f844cf25.tar.gz
2.24.0.1
* configure.in: 2.24.0.1 * NEWS: Update * libsoup/soup-session.c (redirect_handler): * libsoup/soup-message.c (soup_message_new): (soup_message_new_from_uri, soup_message_set_uri): Revert the 2008-08-25 change; it breaks the rhythmbox DAAP plugin. #553466. To be revisited. svn path=/trunk/; revision=1164
Diffstat (limited to 'libsoup/soup-message.c')
-rw-r--r--libsoup/soup-message.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/libsoup/soup-message.c b/libsoup/soup-message.c
index 4c6aebbf..c5890cef 100644
--- a/libsoup/soup-message.c
+++ b/libsoup/soup-message.c
@@ -554,7 +554,7 @@ get_property (GObject *object, guint prop_id,
* Creates a new empty #SoupMessage, which will connect to @uri
*
* Return value: the new #SoupMessage (or %NULL if @uri could not
- * be parsed or is not a valid HTTP/HTTPS URI).
+ * be parsed).
*/
SoupMessage *
soup_message_new (const char *method, const char *uri_string)
@@ -568,6 +568,10 @@ soup_message_new (const char *method, const char *uri_string)
uri = soup_uri_new (uri_string);
if (!uri)
return NULL;
+ if (!uri->host) {
+ soup_uri_free (uri);
+ return NULL;
+ }
msg = soup_message_new_from_uri (method, uri);
soup_uri_free (uri);
@@ -579,20 +583,13 @@ soup_message_new (const char *method, const char *uri_string)
* @method: the HTTP method for the created request
* @uri: the destination endpoint (as a #SoupURI)
*
- * Creates a new empty #SoupMessage, which will connect to @uri.
+ * Creates a new empty #SoupMessage, which will connect to @uri
*
- * Return value: the new #SoupMessage (or %NULL if @uri is not a
- * valid HTTP/HTTPS URI)
+ * Return value: the new #SoupMessage
*/
SoupMessage *
soup_message_new_from_uri (const char *method, SoupURI *uri)
{
- g_return_val_if_fail (method != NULL, NULL);
- g_return_val_if_fail (uri != NULL, NULL);
-
- if (!SOUP_URI_VALID_FOR_HTTP (uri))
- return NULL;
-
return g_object_new (SOUP_TYPE_MESSAGE,
SOUP_MESSAGE_METHOD, method,
SOUP_MESSAGE_URI, uri,
@@ -1269,9 +1266,8 @@ soup_message_is_keepalive (SoupMessage *msg)
* @msg: a #SoupMessage
* @uri: the new #SoupURI
*
- * Sets @msg's URI to @uri, which must be a valid HTTP/HTTPS URI (per
- * SOUP_URI_VALID_FOR_HTTP()). If @msg has already been sent and you
- * want to re-send it with the new URI, you need to call
+ * Sets @msg's URI to @uri. If @msg has already been sent and you want
+ * to re-send it with the new URI, you need to call
* soup_session_requeue_message().
**/
void
@@ -1280,9 +1276,8 @@ soup_message_set_uri (SoupMessage *msg, SoupURI *uri)
SoupMessagePrivate *priv;
g_return_if_fail (SOUP_IS_MESSAGE (msg));
- g_return_if_fail (SOUP_URI_VALID_FOR_HTTP (uri));
-
priv = SOUP_MESSAGE_GET_PRIVATE (msg);
+
if (priv->uri)
soup_uri_free (priv->uri);
priv->uri = soup_uri_copy (uri);