Kaydet (Commit) 35be50a7 authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

One test passed (testFetcher)

üst 89ffd0c8
......@@ -2,6 +2,8 @@
* util.py parçalandı:
-> ileride kod birikmesi olmasın diye (cross compiling özelliği ekleyince)
util.py dosyası parçalandı.
* One test passed:
-> fetcher testindeki errora sebeb olan yer bulundu fetcher fixe edildi.
2018-05-08 Suleyman Poyraz <zaryob.dev@gmail.com>
* Atomicoperations rahatlatılmalı:
......
......@@ -230,14 +230,14 @@ class Fetcher:
def _get_http_headers(self):
headers = []
if self.url.auth_info() and (self.url.scheme() == "http" or self.url.scheme() == "https"):
enc = encodestring('{0}:{0}'.format(self.url.auth_info()))
enc = encodestring('{0}:{0}'.format(self.url.auth_info()).encode('utf-8'))
headers.append(('Authorization', 'Basic {}'.format(enc)))
return str(headers)
def _get_ftp_headers(self):
headers = []
if self.url.auth_info() and self.url.scheme() == "ftp":
enc = encodestring('{0}:{0}'.format(self.url.auth_info()))
enc = encodestring('{0}:{0}'.format(self.url.auth_info()).encode('utf-8'))
headers.append(('Authorization', 'Basic {}'.format(enc)))
return str(headers)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment