Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
d5bf128c
Commit
d5bf128c
authored
May 22, 2023
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage/curl: throw HttpStatusError
parent
5cd86e27
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
CurlStorage.cxx
src/storage/plugins/CurlStorage.cxx
+4
-2
No files found.
src/storage/plugins/CurlStorage.cxx
View file @
d5bf128c
...
...
@@ -22,6 +22,7 @@
#include "storage/StorageInterface.hxx"
#include "storage/FileInfo.hxx"
#include "storage/MemoryDirectoryReader.hxx"
#include "lib/curl/Error.hxx"
#include "lib/curl/Init.hxx"
#include "lib/curl/Global.hxx"
#include "lib/curl/Slist.hxx"
...
...
@@ -300,8 +301,9 @@ private:
/* virtual methods from CurlResponseHandler */
void
OnHeaders
(
unsigned
status
,
Curl
::
Headers
&&
headers
)
final
{
if
(
status
!=
207
)
throw
FormatRuntimeError
(
"Status %d from WebDAV server; expected
\"
207 Multi-Status
\"
"
,
status
);
throw
HttpStatusError
(
status
,
StringFormat
<
80
>
(
"Status %u from WebDAV server; expected
\"
207 Multi-Status
\"
"
,
status
).
c_str
());
if
(
!
IsXmlContentType
(
headers
))
throw
std
::
runtime_error
(
"Unexpected Content-Type from WebDAV server"
);
...
...
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