summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/plugins/base_plugin.rst19
-rw-r--r--module/network/HTTPRequest.py8
2 files changed, 27 insertions, 0 deletions
diff --git a/docs/plugins/base_plugin.rst b/docs/plugins/base_plugin.rst
index 62ab248ef..4ffe2e457 100644
--- a/docs/plugins/base_plugin.rst
+++ b/docs/plugins/base_plugin.rst
@@ -3,3 +3,22 @@
Base Plugin - And here it begins...
===================================
+
+Meta Data
+---------
+
+
+Config Entries
+--------------
+
+
+Tagging Guidelines
+------------------
+
+
+Basic Methods
+-------------
+
+Debugging
+---------
+
diff --git a/module/network/HTTPRequest.py b/module/network/HTTPRequest.py
index cd13dd01f..8d65b025f 100644
--- a/module/network/HTTPRequest.py
+++ b/module/network/HTTPRequest.py
@@ -193,11 +193,19 @@ class HTTPRequest():
if just_header:
self.c.setopt(pycurl.FOLLOWLOCATION, 0)
self.c.setopt(pycurl.NOBODY, 1)
+
+ # overwrite HEAD request, we want a common request type
+ if post:
+ self.c.setopt(pycurl.CUSTOMREQUEST, "POST")
+ else:
+ self.c.setopt(pycurl.CUSTOMREQUEST, "GET")
+
self.c.perform()
rep = self.header
self.c.setopt(pycurl.FOLLOWLOCATION, 1)
self.c.setopt(pycurl.NOBODY, 0)
+ self.c.setopt(pycurl.CUSTOMREQUEST, 0)
else:
self.c.perform()