PUT handler
authorChristian Weiske <cweiske@cweiske.de>
Tue, 19 Nov 2019 14:08:28 +0000 (15:08 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Tue, 19 Nov 2019 14:08:28 +0000 (15:08 +0100)
README.rst
www/empty-json.php [new file with mode: 0644]

index bb6527702bb6ffcde88fa0268c842b393e10ca06..25361c889ba184f9aa3785172645a14168575c2a 100644 (file)
@@ -33,6 +33,14 @@ OUYA setup
 3. Skip credit card registration
 
 
+Apache setup
+============
+Virtual host configuration::
+
+  Script PUT /empty-json.php
+
+``mod_actions`` need to be enabled for apache 2.4.
+
 
 ===========
 Information
diff --git a/www/empty-json.php b/www/empty-json.php
new file mode 100644 (file)
index 0000000..b8dbdee
--- /dev/null
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Needed for Apache 2.4 to handle the following requests:
+ * - PUT /api/v1/gamers/key
+ * - PUT /api/v1/gamers/me/agreements
+ *
+ * Apache's default request handler always throws a "405 Method not allowed"
+ * error when a PUT request comes in.
+ * This method is fine when a different content handler like PHP is used.
+ *
+ * Register this script as handler for put requests in the Apache vhost config: 
+ *   Script PUT /empty-json.php
+ */
+?>
+{}