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
b1e0a5cb
Commit
b1e0a5cb
authored
Sep 02, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle HTTP OPTIONS
parent
50e9af20
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
21 deletions
+32
-21
src/network/httpd.c
src/network/httpd.c
+32
-21
No files found.
src/network/httpd.c
View file @
b1e0a5cb
...
...
@@ -2040,36 +2040,47 @@ static void httpd_HostThread( httpd_host_t *host )
}
else
if
(
i_msg
==
HTTPD_MSG_OPTIONS
)
{
const
char
*
psz
;
/* unimplemented */
answer
->
i_proto
=
query
->
i_proto
;
answer
->
i_type
=
HTTPD_MSG_ANSWER
;
answer
->
i_version
=
0
;
answer
->
i_proto
=
query
->
i_proto
;
answer
->
i_status
=
200
;
answer
->
i_body
=
0
;
answer
->
p_body
=
NULL
;
psz
=
httpd_MsgGet
(
query
,
"Require"
);
if
(
psz
!=
NULL
)
httpd_MsgAdd
(
answer
,
"Server"
,
"%s"
,
PACKAGE_STRING
);
httpd_MsgAdd
(
answer
,
"Content-Length"
,
"0"
);
switch
(
query
->
i_proto
)
{
answer
->
i_status
=
551
;
httpd_MsgAdd
(
query
,
"Unsupported"
,
"%s"
,
psz
);
}
case
HTTPD_PROTO_HTTP
:
httpd_MsgAdd
(
answer
,
"Allow"
,
"GET,HEAD,POST,OPTIONS"
);
break
;
psz
=
httpd_MsgGet
(
query
,
"Cseq"
);
if
(
psz
!=
NULL
)
httpd_MsgAdd
(
answer
,
"Cseq"
,
"%s"
,
psz
);
psz
=
httpd_MsgGet
(
query
,
"Timestamp"
);
if
(
psz
!=
NULL
)
httpd_MsgAdd
(
answer
,
"Timestamp"
,
"%s"
,
psz
);
case
HTTPD_PROTO_RTSP
:
{
const
char
*
p
;
answer
->
i_version
=
0
;
p
=
httpd_MsgGet
(
query
,
"Cseq"
);
if
(
p
!=
NULL
)
httpd_MsgAdd
(
answer
,
"Cseq"
,
"%s"
,
p
);
p
=
httpd_MsgGet
(
query
,
"Timestamp"
);
if
(
p
!=
NULL
)
httpd_MsgAdd
(
answer
,
"Timestamp"
,
"%s"
,
p
);
p
=
httpd_MsgGet
(
query
,
"Require"
);
if
(
p
!=
NULL
)
{
answer
->
i_status
=
551
;
httpd_MsgAdd
(
query
,
"Unsupported"
,
"%s"
,
p
);
}
httpd_MsgAdd
(
answer
,
"Server"
,
"%s"
,
PACKAGE_STRING
);
httpd_MsgAdd
(
answer
,
"Public"
,
"DESCRIBE, SETUP, "
"TEARDOWN, PLAY, PAUSE, GET_PARAMETER"
);
httpd_MsgAdd
(
answer
,
"Content-Length"
,
"0"
);
httpd_MsgAdd
(
answer
,
"Public"
,
"DESCRIBE,SETUP,"
"TEARDOWN,PLAY,PAUSE,GET_PARAMETER"
);
}
break
;
}
cl
->
i_buffer
=
-
1
;
/* Force the creation of the answer in
* httpd_ClientSend */
...
...
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