incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 3/3] Added XML and HTML representation of 405 error code
Date Mon, 08 Nov 2010 11:38:26 GMT
From: Michal Fojtik <mfojtik@redhat.com>

---
 server/views/errors/not_allowed.html.haml |    6 ++++++
 server/views/errors/not_allowed.xml.haml  |    2 ++
 2 files changed, 8 insertions(+), 0 deletions(-)
 create mode 100644 server/views/errors/not_allowed.html.haml
 create mode 100644 server/views/errors/not_allowed.xml.haml

diff --git a/server/views/errors/not_allowed.html.haml b/server/views/errors/not_allowed.html.haml
new file mode 100644
index 0000000..59e9fe9
--- /dev/null
+++ b/server/views/errors/not_allowed.html.haml
@@ -0,0 +1,6 @@
+%h1 Method Not Allowed
+
+%dl
+  %di
+    %dt Request URL
+    %dd= request.env['REQUEST_URI']
diff --git a/server/views/errors/not_allowed.xml.haml b/server/views/errors/not_allowed.xml.haml
new file mode 100644
index 0000000..3bad335
--- /dev/null
+++ b/server/views/errors/not_allowed.xml.haml
@@ -0,0 +1,2 @@
+%error{:url => "#{request.env['REQUEST_URI']}", :status => "#{response.status}"}
+  %message Method not allowed for this resource
-- 
1.7.2.3


Mime
View raw message