Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
16847983
Commit
16847983
authored
Jan 13, 2016
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
https: make HTTP/2 ALPN flag an input/output parameter
This enables forcing HTTP/1 (for proxies).
parent
2c1bb0b7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
10 deletions
+9
-10
modules/access/http/connmgr.c
modules/access/http/connmgr.c
+5
-6
modules/access/http/transport.c
modules/access/http/transport.c
+1
-1
modules/access/http/tunnel.c
modules/access/http/tunnel.c
+2
-2
modules/access/http/tunnel_test.c
modules/access/http/tunnel_test.c
+1
-1
No files found.
modules/access/http/connmgr.c
View file @
16847983
...
@@ -39,7 +39,7 @@ struct vlc_https_connecting
...
@@ -39,7 +39,7 @@ struct vlc_https_connecting
vlc_tls_creds_t
*
creds
;
vlc_tls_creds_t
*
creds
;
const
char
*
host
;
const
char
*
host
;
unsigned
port
;
unsigned
port
;
bool
http2
;
bool
*
http2
;
vlc_sem_t
done
;
vlc_sem_t
done
;
};
};
...
@@ -71,12 +71,12 @@ static void *vlc_https_connect_thread(void *data)
...
@@ -71,12 +71,12 @@ static void *vlc_https_connect_thread(void *data)
char
*
proxy
=
vlc_https_proxy_find
(
c
->
host
,
c
->
port
);
char
*
proxy
=
vlc_https_proxy_find
(
c
->
host
,
c
->
port
);
if
(
proxy
!=
NULL
)
if
(
proxy
!=
NULL
)
{
{
tls
=
vlc_https_connect_proxy
(
c
->
creds
,
c
->
host
,
c
->
port
,
&
c
->
http2
,
tls
=
vlc_https_connect_proxy
(
c
->
creds
,
c
->
host
,
c
->
port
,
c
->
http2
,
proxy
);
proxy
);
free
(
proxy
);
free
(
proxy
);
}
}
else
else
tls
=
vlc_https_connect
(
c
->
creds
,
c
->
host
,
c
->
port
,
&
c
->
http2
);
tls
=
vlc_https_connect
(
c
->
creds
,
c
->
host
,
c
->
port
,
c
->
http2
);
vlc_sem_post
(
&
c
->
done
);
vlc_sem_post
(
&
c
->
done
);
return
tls
;
return
tls
;
}
}
...
@@ -92,6 +92,7 @@ static vlc_tls_t *vlc_https_connect_i11e(vlc_tls_creds_t *creds,
...
@@ -92,6 +92,7 @@ static vlc_tls_t *vlc_https_connect_i11e(vlc_tls_creds_t *creds,
c
.
creds
=
creds
;
c
.
creds
=
creds
;
c
.
host
=
host
;
c
.
host
=
host
;
c
.
port
=
port
;
c
.
port
=
port
;
c
.
http2
=
http_two
;
vlc_sem_init
(
&
c
.
done
,
0
);
vlc_sem_init
(
&
c
.
done
,
0
);
if
(
vlc_clone
(
&
th
,
vlc_https_connect_thread
,
&
c
,
if
(
vlc_clone
(
&
th
,
vlc_https_connect_thread
,
&
c
,
...
@@ -108,8 +109,6 @@ static vlc_tls_t *vlc_https_connect_i11e(vlc_tls_creds_t *creds,
...
@@ -108,8 +109,6 @@ static vlc_tls_t *vlc_https_connect_i11e(vlc_tls_creds_t *creds,
if
(
res
==
VLC_THREAD_CANCELED
)
if
(
res
==
VLC_THREAD_CANCELED
)
res
=
NULL
;
res
=
NULL
;
if
(
res
!=
NULL
)
*
http_two
=
c
.
http2
;
return
res
;
return
res
;
}
}
...
@@ -229,7 +228,7 @@ static struct vlc_http_msg *vlc_https_request(struct vlc_http_mgr *mgr,
...
@@ -229,7 +228,7 @@ static struct vlc_http_msg *vlc_https_request(struct vlc_http_mgr *mgr,
if
(
resp
!=
NULL
)
if
(
resp
!=
NULL
)
return
resp
;
/* existing connection reused */
return
resp
;
/* existing connection reused */
bool
http2
;
bool
http2
=
true
;
vlc_tls_t
*
tls
=
vlc_https_connect_i11e
(
mgr
->
creds
,
host
,
port
,
&
http2
);
vlc_tls_t
*
tls
=
vlc_https_connect_i11e
(
mgr
->
creds
,
host
,
port
,
&
http2
);
if
(
tls
==
NULL
)
if
(
tls
==
NULL
)
return
NULL
;
return
NULL
;
...
...
modules/access/http/transport.c
View file @
16847983
...
@@ -136,7 +136,7 @@ vlc_tls_t *vlc_https_connect(vlc_tls_creds_t *creds, const char *name,
...
@@ -136,7 +136,7 @@ vlc_tls_t *vlc_https_connect(vlc_tls_creds_t *creds, const char *name,
char
*
alp
;
char
*
alp
;
vlc_tls_t
*
tls
=
vlc_tls_ClientSessionCreateFD
(
creds
,
fd
,
name
,
"https"
,
vlc_tls_t
*
tls
=
vlc_tls_ClientSessionCreateFD
(
creds
,
fd
,
name
,
"https"
,
alpn
,
&
alp
);
alpn
+
!*
two
,
&
alp
);
if
(
tls
==
NULL
)
if
(
tls
==
NULL
)
{
{
net_Close
(
fd
);
net_Close
(
fd
);
...
...
modules/access/http/tunnel.c
View file @
16847983
...
@@ -168,8 +168,8 @@ vlc_tls_t *vlc_https_connect_proxy(vlc_tls_creds_t *creds,
...
@@ -168,8 +168,8 @@ vlc_tls_t *vlc_https_connect_proxy(vlc_tls_creds_t *creds,
session
->
close
=
vlc_http_tls_close_ignore
;
session
->
close
=
vlc_http_tls_close_ignore
;
vlc_http_msg_destroy
(
resp
);
/* <- session is destroyed here */
vlc_http_msg_destroy
(
resp
);
/* <- session is destroyed here */
session
=
vlc_tls_ClientSessionCreateFD
(
creds
,
fd
,
hostname
,
"https"
,
alpn
,
session
=
vlc_tls_ClientSessionCreateFD
(
creds
,
fd
,
hostname
,
"https"
,
&
alp
);
alpn
+
!*
two
,
&
alp
);
#endif
#endif
if
(
session
==
NULL
)
if
(
session
==
NULL
)
{
{
...
...
modules/access/http/tunnel_test.c
View file @
16847983
...
@@ -129,7 +129,7 @@ int main(void)
...
@@ -129,7 +129,7 @@ int main(void)
{
{
char
*
url
;
char
*
url
;
unsigned
port
;
unsigned
port
;
bool
two
;
bool
two
=
false
;
/* Test bad URLs */
/* Test bad URLs */
vlc_https_connect_proxy
(
NULL
,
"www.example.com"
,
0
,
&
two
,
vlc_https_connect_proxy
(
NULL
,
"www.example.com"
,
0
,
&
two
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment