diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-01-10 00:04:24 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-01-10 00:04:24 +0100 |
commit | c654f31efc548957f10e3f4c1a5060dcea1dcdec (patch) | |
tree | f7dbbe4d6015d4310a09761a73d7c4402dce0868 | |
parent | updated docs (diff) | |
download | pyload-c654f31efc548957f10e3f4c1a5060dcea1dcdec.tar.xz |
changed HEAD request
-rw-r--r-- | docs/plugins/base_plugin.rst | 19 | ||||
-rw-r--r-- | module/network/HTTPRequest.py | 8 |
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() |