085742f3c1
The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/openwsman#86820ef4bec0de1557d1dfe3f19786392b5ca640
40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
diff -up openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/wsmand-listener.c.orig openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/wsmand-listener.c
|
|
--- openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/wsmand-listener.c.orig 2016-07-27 16:03:55.000000000 +0200
|
|
+++ openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/wsmand-listener.c 2018-01-22 13:05:04.478923300 +0100
|
|
@@ -344,6 +344,35 @@ DONE:
|
|
if (fault_reason == NULL) {
|
|
// this is a way to segfault, investigate
|
|
//fault_reason = shttpd_reason_phrase(status);
|
|
+ // ugly workaround follows...
|
|
+ switch (status) {
|
|
+ case 200:
|
|
+ fault_reason = "OK";
|
|
+ break;
|
|
+ case 400:
|
|
+ fault_reason = "Bad request";
|
|
+ break;
|
|
+ case 401:
|
|
+ fault_reason = "Unauthorized";
|
|
+ break;
|
|
+ case 403:
|
|
+ fault_reason = "Forbidden";
|
|
+ break;
|
|
+ case 404:
|
|
+ fault_reason = "Not found";
|
|
+ break;
|
|
+ case 500:
|
|
+ fault_reason = "Internal Error";
|
|
+ break;
|
|
+ case 501:
|
|
+ fault_reason = "Not implemented";
|
|
+ break;
|
|
+ case 415:
|
|
+ fault_reason = "Unsupported Media Type";
|
|
+ break;
|
|
+ default:
|
|
+ fault_reason = "";
|
|
+ }
|
|
}
|
|
debug("Response status=%d (%s)", status, fault_reason);
|
|
|