Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
89fc7435
Commit
89fc7435
authored
Sep 10, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* http: Added 'Connection: Close' in the request. (Help with some http
servers). Use atoll. (always defined).
parent
c4c497c7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
16 deletions
+6
-16
modules/access/http.c
modules/access/http.c
+6
-16
No files found.
modules/access/http.c
View file @
89fc7435
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* http.c: HTTP access plug-in
* http.c: HTTP access plug-in
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* Copyright (C) 2001, 2002 VideoLAN
* $Id: http.c,v 1.4
5 2003/09/10 15:50:25 zorglub
Exp $
* $Id: http.c,v 1.4
6 2003/09/10 21:03:56 fenrir
Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
* Preamble
* Preamble
*****************************************************************************/
*****************************************************************************/
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <vlc/vlc.h>
#include <vlc/vlc.h>
#include <vlc/input.h>
#include <vlc/input.h>
...
@@ -151,6 +150,7 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
...
@@ -151,6 +150,7 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
"Range: bytes="
I64Fd
"-
\r\n
"
"Range: bytes="
I64Fd
"-
\r\n
"
HTTP_USERAGENT
HTTP_USERAGENT
"%s"
"%s"
"Connection: Close
\r\n
"
HTTP_END
,
HTTP_END
,
p_access_data
->
psz_buffer
,
i_tell
,
p_access_data
->
psz_auth_string
);
p_access_data
->
psz_buffer
,
i_tell
,
p_access_data
->
psz_auth_string
);
}
}
...
@@ -160,6 +160,7 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
...
@@ -160,6 +160,7 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
"%s"
"%s"
HTTP_USERAGENT
HTTP_USERAGENT
"%s"
"%s"
"Connection: Close
\r\n
"
HTTP_END
,
HTTP_END
,
p_access_data
->
psz_buffer
,
p_access_data
->
psz_auth_string
);
p_access_data
->
psz_buffer
,
p_access_data
->
psz_auth_string
);
}
}
...
@@ -214,7 +215,6 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
...
@@ -214,7 +215,6 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
psz_parser
+=
strlen
(
"HTTP/1.x"
);
psz_parser
+=
strlen
(
"HTTP/1.x"
);
i_size
-=
strlen
(
"HTTP/1.x"
);
i_size
-=
strlen
(
"HTTP/1.x"
);
}
}
else
if
(
(
(
size_t
)
i_size
>=
strlen
(
"ICY"
)
&&
else
if
(
(
(
size_t
)
i_size
>=
strlen
(
"ICY"
)
&&
!
strncmp
(
psz_parser
,
"ICY"
,
strlen
(
"ICY"
)
)
)
)
!
strncmp
(
psz_parser
,
"ICY"
,
strlen
(
"ICY"
)
)
)
)
...
@@ -325,18 +325,8 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
...
@@ -325,18 +325,8 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
if
(
!
strcasecmp
(
psz_line
,
"Content-Length"
)
)
if
(
!
strcasecmp
(
psz_line
,
"Content-Length"
)
)
{
{
off_t
i_size
=
0
;
off_t
i_size
=
0
;
#ifdef HAVE_ATOLL
i_size
=
i_tell
+
atoll
(
psz_value
);
#else
int
sign
=
1
;
if
(
*
psz_value
==
'-'
)
sign
=
-
1
;
i_size
=
i_tell
+
atoll
(
psz_value
);
while
(
*
psz_value
>=
'0'
&&
*
psz_value
<=
'9'
)
{
i_size
=
i_size
*
10
+
*
psz_value
++
-
'0'
;
}
i_size
=
i_tell
+
(
i_size
*
sign
);
#endif
msg_Dbg
(
p_input
,
"stream size is "
I64Fd
,
i_size
);
msg_Dbg
(
p_input
,
"stream size is "
I64Fd
,
i_size
);
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
...
...
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