Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
2073a823
Commit
2073a823
authored
Aug 25, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* httpd: when using "video/x-ms-asf-stream" we add special headers needed
for mmsh protocol.
parent
71082206
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
3 deletions
+28
-3
modules/misc/httpd.c
modules/misc/httpd.c
+28
-3
No files found.
modules/misc/httpd.c
View file @
2073a823
...
...
@@ -2,7 +2,7 @@
* httpd.c
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: httpd.c,v 1.2
5 2003/08/11 20:18:02
fenrir Exp $
* $Id: httpd.c,v 1.2
6 2003/08/25 01:32:26
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -1433,6 +1433,7 @@ static void httpd_ConnectionParseRequest( httpd_sys_t *p_httpt, httpd_connection
char
*
p
,
*
p_end
;
int
i
;
int
b_xplaystream
=
VLC_FALSE
;
char
command
[
32
];
char
url
[
1024
];
char
version
[
32
];
...
...
@@ -1523,6 +1524,16 @@ static void httpd_ConnectionParseRequest( httpd_sys_t *p_httpt, httpd_connection
}
}
}
else
if
(
!
strcmp
(
header
,
"Pragma:"
)
)
{
char
method
[
128
];
httpd_RequestGetWord
(
method
,
128
,
&
p
,
p_end
);
if
(
!
strcasecmp
(
method
,
"xPlayStrm=1"
)
)
{
b_xplaystream
=
VLC_TRUE
;
}
}
}
if
(
strchr
(
url
,
'?'
)
)
...
...
@@ -1646,12 +1657,26 @@ search_file:
p
=
p_con
->
p_buffer
=
malloc
(
p_con
->
i_buffer_size
);
p
+=
sprintf
(
p
,
"HTTP/1.0 %d %s
\r\n
"
,
p_con
->
i_http_error
,
psz_status
);
p
+=
sprintf
(
p
,
"Content-type: %s
\r\n
"
,
p_con
->
p_file
->
psz_mime
);
if
(
!
strcmp
(
p_con
->
p_file
->
psz_mime
,
"video/x-ms-asf-stream"
)
)
{
p
+=
sprintf
(
p
,
"Server: Cougar 4.1.0.3923
\r\n
"
);
p
+=
sprintf
(
p
,
"Content-type: application/octet-stream
\r\n
"
);
p
+=
sprintf
(
p
,
"Pragma: client-id=%d
\r\n
"
,
rand
()
&
0x7fffffff
);
p
+=
sprintf
(
p
,
"Pragma: features=
\"
broadcast
\"\r\n
"
);
if
(
!
b_xplaystream
)
{
p_con
->
i_method
=
HTTPD_CONNECTION_METHOD_HEAD
;
}
}
else
{
p
+=
sprintf
(
p
,
"Content-type: %s
\r\n
"
,
p_con
->
p_file
->
psz_mime
);
}
p
+=
sprintf
(
p
,
"Cache-Control: no-cache
\r\n
"
);
if
(
p_con
->
i_http_error
==
401
)
{
p
+=
sprintf
(
p
,
"WWW-Authenticate: Basic realm=
\"
%s
\"\r\n
"
,
user
);
}
p
+=
sprintf
(
p
,
"Cache-Control: no-cache
\r\n
"
);
p
+=
sprintf
(
p
,
"
\r\n
"
);
p_con
->
i_buffer_size
=
strlen
(
p_con
->
p_buffer
);
// + 1;
...
...
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