libsoup r1035 - branches/libsoup-2.4/libsoup
- From: danw svn gnome org
- To: svn-commits-list gnome org
- Subject: libsoup r1035 - branches/libsoup-2.4/libsoup
- Date: Tue, 15 Jan 2008 03:43:38 +0000 (GMT)
Author: danw
Date: Tue Jan 15 03:43:37 2008
New Revision: 1035
URL: http://svn.gnome.org/viewvc/libsoup?rev=1035&view=rev
Log:
change so that soup_uri_set_scheme() defaults the port too
Modified:
branches/libsoup-2.4/libsoup/soup-uri.c
Modified: branches/libsoup-2.4/libsoup/soup-uri.c
==============================================================================
--- branches/libsoup-2.4/libsoup/soup-uri.c (original)
+++ branches/libsoup-2.4/libsoup/soup-uri.c Tue Jan 15 03:43:37 2008
@@ -779,15 +779,14 @@
* @uri: a #SoupURI
* @scheme: the URI scheme
*
- * Sets @uri's scheme to @scheme. (If @scheme is "http" or "https",
- * then you are responsible for making sure that @uri is otherwise
- * valid in the other ways libsoup expects, as described in the
- * #SoupURI documentation.)
+ * Sets @uri's scheme to @scheme. This will also set @uri's port to
+ * the default port for @scheme, if known.
**/
void
soup_uri_set_scheme (SoupURI *uri, const char *scheme)
{
uri->scheme = soup_uri_get_scheme (scheme, strlen (scheme));
+ uri->port = soup_scheme_default_port (uri->scheme);
}
/**
@@ -843,10 +842,6 @@
*
* Sets @uri's port to @port. If @port is 0, @uri will not have an
* explicitly-specified port.
- *
- * Note that when constructing an http or https URI by hand, you MUST
- * set its port to the appropriate value. It will not default to
- * anything.
**/
void
soup_uri_set_port (SoupURI *uri, guint port)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]