summaryrefslogtreecommitdiffstats
path: root/module/network
diff options
context:
space:
mode:
Diffstat (limited to 'module/network')
-rw-r--r--module/network/CookieJar.py1
-rw-r--r--module/network/HTTPRequest.py4
-rw-r--r--module/network/RequestFactory.py1
3 files changed, 5 insertions, 1 deletions
diff --git a/module/network/CookieJar.py b/module/network/CookieJar.py
index a020d6f9e..ea2c43a9e 100644
--- a/module/network/CookieJar.py
+++ b/module/network/CookieJar.py
@@ -19,6 +19,7 @@
from time import time
+# TODO: replace with simplecookie?
class CookieJar():
def __init__(self, pluginname):
self.cookies = {}
diff --git a/module/network/HTTPRequest.py b/module/network/HTTPRequest.py
index 990148e0f..874da368b 100644
--- a/module/network/HTTPRequest.py
+++ b/module/network/HTTPRequest.py
@@ -193,13 +193,14 @@ class HTTPRequest():
self.setRequestContext(url, get, post, referer, cookies, multipart)
+ # TODO: use http/rfc message instead
self.header = ""
self.c.setopt(pycurl.HTTPHEADER, self.headers)
if just_header:
self.c.setopt(pycurl.FOLLOWLOCATION, 0)
- self.c.setopt(pycurl.NOBODY, 1)
+ self.c.setopt(pycurl.NOBODY, 1) #TODO: nobody= no post?
# overwrite HEAD request, we want a common request type
if post:
@@ -233,6 +234,7 @@ class HTTPRequest():
def verifyHeader(self):
""" raise an exceptions on bad headers """
code = int(self.c.getinfo(pycurl.RESPONSE_CODE))
+ # TODO: raise anyway to be consistent, also rename exception
if code in bad_headers:
#404 will NOT raise an exception
raise BadHeader(code, self.getResponse())
diff --git a/module/network/RequestFactory.py b/module/network/RequestFactory.py
index 932184678..1581be9fc 100644
--- a/module/network/RequestFactory.py
+++ b/module/network/RequestFactory.py
@@ -36,6 +36,7 @@ class RequestFactory():
return self.core.config["download"]["interface"]
def getRequest(self, pluginName, cj=None):
+ # TODO: mostly obsolete, browser could be removed completely
req = Browser(self.bucket, self.getOptions())
if cj: