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
1ea45a84
Commit
1ea45a84
authored
Dec 17, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "http: add --http2 to force HTTP/2"
This reverts commit
99ce7125
.
parent
aa780d58
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
23 deletions
+9
-23
modules/access/http.c
modules/access/http.c
+9
-23
No files found.
modules/access/http.c
View file @
1ea45a84
...
@@ -117,8 +117,6 @@ vlc_module_begin ()
...
@@ -117,8 +117,6 @@ vlc_module_begin ()
change_safe
()
change_safe
()
add_bool
(
"http-forward-cookies"
,
true
,
FORWARD_COOKIES_TEXT
,
add_bool
(
"http-forward-cookies"
,
true
,
FORWARD_COOKIES_TEXT
,
FORWARD_COOKIES_LONGTEXT
,
true
)
FORWARD_COOKIES_LONGTEXT
,
true
)
add_bool
(
"http2"
,
false
,
N_
(
"HTTP 2.0"
),
N_
(
"Negotiate HTTP version 2.0"
),
true
)
/* 'itpc' = iTunes Podcast */
/* 'itpc' = iTunes Podcast */
add_shortcut
(
"http"
,
"https"
,
"unsv"
,
"itpc"
,
"icyx"
)
add_shortcut
(
"http"
,
"https"
,
"unsv"
,
"itpc"
,
"icyx"
)
set_callbacks
(
Open
,
Close
)
set_callbacks
(
Open
,
Close
)
...
@@ -984,20 +982,19 @@ static int Connect( access_t *p_access, uint64_t i_tell )
...
@@ -984,20 +982,19 @@ static int Connect( access_t *p_access, uint64_t i_tell )
/* Initialize TLS/SSL session */
/* Initialize TLS/SSL session */
if
(
p_sys
->
p_creds
!=
NULL
)
if
(
p_sys
->
p_creds
!=
NULL
)
{
{
bool
http2
=
var_InheritBool
(
p_access
,
"http2"
);
if
(
(
p_sys
->
b_proxy
||
http2
)
&&
p_sys
->
i_version
==
0
)
{
/* ALPN and CONNECT are not compatible with HTTP/1.0 */
Disconnect
(
p_access
);
return
-
1
;
}
/* CONNECT to establish TLS tunnel through HTTP proxy */
/* CONNECT to establish TLS tunnel through HTTP proxy */
if
(
p_sys
->
b_proxy
)
if
(
p_sys
->
b_proxy
)
{
{
char
*
psz
;
char
*
psz
;
unsigned
i_status
;
unsigned
i_status
;
if
(
p_sys
->
i_version
==
0
)
{
/* CONNECT is not in HTTP/1.0 */
Disconnect
(
p_access
);
return
-
1
;
}
WriteHeaders
(
p_access
,
WriteHeaders
(
p_access
,
"CONNECT %s:%d HTTP/1.1
\r\n
Host: %s:%d
\r\n\r\n
"
,
"CONNECT %s:%d HTTP/1.1
\r\n
Host: %s:%d
\r\n\r\n
"
,
p_sys
->
url
.
psz_host
,
p_sys
->
url
.
i_port
,
p_sys
->
url
.
psz_host
,
p_sys
->
url
.
i_port
,
...
@@ -1047,28 +1044,17 @@ static int Connect( access_t *p_access, uint64_t i_tell )
...
@@ -1047,28 +1044,17 @@ static int Connect( access_t *p_access, uint64_t i_tell )
}
}
/* TLS/SSL handshake */
/* TLS/SSL handshake */
const
char
*
alpn
[
3
]
=
{
"h2"
,
"http/1.1"
,
NULL
};
const
char
*
alpn
[]
=
{
"http/1.1"
,
NULL
};
char
*
alp
;
p_sys
->
p_tls
=
vlc_tls_ClientSessionCreate
(
p_sys
->
p_creds
,
p_sys
->
fd
,
p_sys
->
p_tls
=
vlc_tls_ClientSessionCreate
(
p_sys
->
p_creds
,
p_sys
->
fd
,
p_sys
->
url
.
psz_host
,
"https"
,
p_sys
->
url
.
psz_host
,
"https"
,
p_sys
->
i_version
?
(
alpn
+
!
http2
)
:
NULL
,
&
alp
);
p_sys
->
i_version
?
alpn
:
NULL
,
NULL
);
if
(
p_sys
->
p_tls
==
NULL
)
if
(
p_sys
->
p_tls
==
NULL
)
{
{
msg_Err
(
p_access
,
"cannot establish HTTP/TLS session"
);
msg_Err
(
p_access
,
"cannot establish HTTP/TLS session"
);
Disconnect
(
p_access
);
Disconnect
(
p_access
);
return
-
1
;
return
-
1
;
}
}
http2
=
alp
!=
NULL
&&
!
strcmp
(
"h2"
,
alp
);
free
(
alp
);
if
(
http2
)
{
msg_Dbg
(
p_access
,
"handing off to HTTP2 plugin"
);
Disconnect
(
p_access
);
return
-
1
;
}
}
}
return
Request
(
p_access
,
i_tell
)
?
-
2
:
0
;
return
Request
(
p_access
,
i_tell
)
?
-
2
:
0
;
...
...
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