Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
a68e0d9a
Commit
a68e0d9a
authored
9 years ago
by
Alexander Alashkin
Committed by
rojer
9 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add WebDAV move stub
PUBLISHED_FROM=b1f712862b81dfe8da6547338f77ff3bfefa5051
parent
cfe80ba9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
mongoose.c
mongoose.c
+17
-1
No files found.
mongoose.c
View file @
a68e0d9a
...
...
@@ -5527,6 +5527,20 @@ static int remove_directory(const struct mg_serve_http_opts *opts,
return
1
;
}
static
void
handle_move
(
struct
mg_connection
*
nc
,
const
struct
mg_serve_http_opts
*
opts
,
const
char
*
path
,
struct
http_message
*
hm
)
{
/*
* This method is not implemented now, but at least
* we have to send error 501
*/
(
void
)
nc
;
(
void
)
opts
;
(
void
)
path
;
(
void
)
hm
;
send_http_error
(
nc
,
501
,
"Not implemented"
);
}
static
void
handle_delete
(
struct
mg_connection
*
nc
,
const
struct
mg_serve_http_opts
*
opts
,
const
char
*
path
)
{
...
...
@@ -5606,7 +5620,7 @@ static void handle_put(struct mg_connection *nc, const char *path,
static
int
is_dav_request
(
const
struct
mg_str
*
s
)
{
return
!
mg_vcmp
(
s
,
"PUT"
)
||
!
mg_vcmp
(
s
,
"DELETE"
)
||
!
mg_vcmp
(
s
,
"MKCOL"
)
||
!
mg_vcmp
(
s
,
"PROPFIND"
);
!
mg_vcmp
(
s
,
"PROPFIND"
)
||
!
mg_vcmp
(
s
,
"MOVE"
)
;
}
/*
...
...
@@ -6293,6 +6307,8 @@ void mg_send_http_file(struct mg_connection *nc, char *path,
handle_delete
(
nc
,
opts
,
path
);
}
else
if
(
!
mg_vcmp
(
&
hm
->
method
,
"PUT"
))
{
handle_put
(
nc
,
path
,
hm
);
}
else
if
(
!
mg_vcmp
(
&
hm
->
method
,
"MOVE"
))
{
handle_move
(
nc
,
opts
,
path
,
hm
);
#endif
}
else
if
(
!
mg_vcmp
(
&
hm
->
method
,
"OPTIONS"
))
{
send_options
(
nc
);
...
...
This diff is collapsed.
Click to expand it.
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