Browse code

http: Reorder two code blocks

This is in preparation for a later commit.

Signed-off-by: Martin Storsjö <martin@martin.st>

Martin Storsjö authored on 2011/11/10 21:55:18
Showing 1 changed files
... ...
@@ -110,6 +110,14 @@ static int http_open_cnx(URLContext *h)
110 110
                  path1, sizeof(path1), s->location);
111 111
     ff_url_join(hoststr, sizeof(hoststr), NULL, NULL, hostname, port, NULL);
112 112
 
113
+    if (!strcmp(proto, "https")) {
114
+        lower_proto = "tls";
115
+        if (port < 0)
116
+            port = 443;
117
+    }
118
+    if (port < 0)
119
+        port = 80;
120
+
113 121
     if (path1[0] == '\0')
114 122
         path = "/";
115 123
     else
... ...
@@ -124,13 +132,6 @@ static int http_open_cnx(URLContext *h)
124 124
         av_url_split(NULL, 0, proxyauth, sizeof(proxyauth),
125 125
                      hostname, sizeof(hostname), &port, NULL, 0, proxy_path);
126 126
     }
127
-    if (!strcmp(proto, "https")) {
128
-        lower_proto = "tls";
129
-        if (port < 0)
130
-            port = 443;
131
-    }
132
-    if (port < 0)
133
-        port = 80;
134 127
 
135 128
     ff_url_join(buf, sizeof(buf), lower_proto, NULL, hostname, port, NULL);
136 129
     err = ffurl_open(&hd, buf, AVIO_FLAG_READ_WRITE,