]> git.sesse.net Git - vlc/blobdiff - modules/access/http.c
Update LGPL license blurb, choosing v2.1+.
[vlc] / modules / access / http.c
index 747eba0675886bedc68ecb8786135b9361c5ed68..90b7d4867c13cbbb941753a8aa6f9c4e15250e88 100644 (file)
@@ -83,10 +83,6 @@ static void Close( vlc_object_t * );
     "Caching value for HTTP streams. This " \
     "value should be set in milliseconds." )
 
-#define AGENT_TEXT N_("HTTP user agent")
-#define AGENT_LONGTEXT N_("User agent that will be " \
-    "used for the connection.")
-
 #define RECONNECT_TEXT N_("Auto re-connect")
 #define RECONNECT_LONGTEXT N_( \
     "Automatically try to reconnect to the stream in case of a sudden " \
@@ -123,9 +119,9 @@ vlc_module_begin ()
     add_integer( "http-caching", 4 * DEFAULT_PTS_DELAY / 1000, NULL,
                  CACHING_TEXT, CACHING_LONGTEXT, true )
         change_safe()
-    add_string( "http-user-agent", PACKAGE_NAME"/"PACKAGE_VERSION, NULL,
-                AGENT_TEXT, AGENT_LONGTEXT, true )
+    add_string( "http-user-agent", NULL, NULL, NULL, NULL, false )
         change_safe()
+        change_private()
     add_bool( "http-reconnect", false, NULL, RECONNECT_TEXT,
               RECONNECT_LONGTEXT, true )
     add_bool( "http-continuous", false, NULL, CONTINUOUS_TEXT,
@@ -141,11 +137,8 @@ vlc_module_begin ()
 #endif
     add_obsolete_string("http-user")
     add_obsolete_string("http-pwd")
-    add_shortcut( "http" )
-    add_shortcut( "https" )
-    add_shortcut( "unsv" )
-    add_shortcut( "itpc" ) /* iTunes Podcast */
-    add_shortcut( "icyx" )
+    /* 'itpc' = iTunes Podcast */
+    add_shortcut( "http", "https", "unsv", "itpc", "icyx" )
     set_callbacks( Open, Close )
 vlc_module_end ()
 
@@ -426,7 +419,7 @@ static int OpenWithCookies( vlc_object_t *p_this, const char *psz_access,
                         {
                             /* Get the proxy URL :
                             Proxy server value in the registry can be something like "address:port"
-                            or "ftp=adress1:port1;http=adress2:port2 ..." depending of the
+                            or "ftp=address1:port1;http=address2:port2 ..." depending of the
                             confirguration. */
                             char *psz_proxy;
                             psz_proxy = strstr( psz_key, "http=" );
@@ -1076,7 +1069,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
         /* */
         case ACCESS_GET_PTS_DELAY:
             pi_64 = (int64_t*)va_arg( args, int64_t * );
-            *pi_64 = (int64_t)var_GetInteger( p_access, "http-caching" ) * 1000;
+            *pi_64 = var_GetInteger( p_access, "http-caching" ) * 1000;
             break;
 
         /* */
@@ -1286,7 +1279,8 @@ static int Request( access_t *p_access, uint64_t i_tell )
         }
     }
     /* User Agent */
-    net_Printf( p_access, p_sys->fd, pvs, "User-Agent: %s\r\n",
+    net_Printf( p_access, p_sys->fd, pvs,
+                "User-Agent: %s\r\n",
                 p_sys->psz_user_agent );
     /* Offset */
     if( p_sys->i_version == 1 && ! p_sys->b_continuous )