We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit a45e4086 authored by Jonas Haraldsson's avatar Jonas Haraldsson

Proper XML errors

Use XML::error function to generate the error, and run it through
xml_response
parent a7d8def3
......@@ -1406,8 +1406,7 @@ function report_failure($code) {
$json_data = array('error' => $code, 'message' => $error_text[$code]);
json_response(json_encode($json_data));
} else {
print("<lfm status=\"failed\">\n");
print(" <error code=\"{$code}\">" . $error_text[$code] . "</error></lfm>");
xml_response(XML::error('failed', $code, $error_text[$code]));
}
die();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment