Skip to content

Commit d3bb243

Browse files
committed
Merge pull request #123 from qiniu/develop
Release 6.1.7
2 parents 7b935a3 + d847f08 commit d3bb243

File tree

4 files changed

+3
-14
lines changed

4 files changed

+3
-14
lines changed

qiniu/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
RS_HOST = "rs.qbox.me"
77
RSF_HOST = "rsf.qbox.me"
8-
UP_HOST = "up.qiniu.com"
8+
UP_HOST = "upload.qiniu.com"
99
UP_HOST2 = "up.qbox.me"
1010

1111
from . import __version__

qiniu/io.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def put(uptoken, key, data, extra=None):
5353
{'filename': fname, 'data': data, 'mime_type': extra.mime_type},
5454
]
5555
ret, err, code = rpc.Client(conf.UP_HOST).call_with_multipart("/", fields, files)
56-
if err is None or code == 571 or code == 614 or code == 301:
56+
if err is None or code / 100 == 4 or code == 579 or code / 100 == 6 or code / 100 == 7:
5757
return ret, err
5858

5959
ret, err, code = rpc.Client(conf.UP_HOST2).call_with_multipart("/", fields, files)

qiniu/resumable_io.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def put(uptoken, key, f, fsize, extra):
7979
host = conf.UP_HOST
8080
try:
8181
ret, err, code = put_with_host(uptoken, key, f, fsize, extra, host)
82-
if err is None or code == 571 or code == 614 or code == 301:
82+
if err is None or code / 100 == 4 or code == 579 or code / 100 == 6 or code / 100 == 7:
8383
return ret, err
8484
except:
8585
pass

qiniu/test/io_test.py

-11
Original file line numberDiff line numberDiff line change
@@ -177,17 +177,6 @@ def test_put_fail_reqid(self):
177177
ret, err = io.put("", key, data, extra)
178178
assert "reqid" in err
179179

180-
def test_put_with_uphost2(self):
181-
conf.UP_HOST = "api.qiniu.com" # mistake up host
182-
localfile = "%s" % __file__
183-
key = "test_up2_%s" % r(9)
184-
185-
extra.check_crc = 1
186-
ret, err = io.put_file(policy.token(), key, localfile, extra)
187-
assert err is None
188-
assert ret['key'] == key
189-
conf.UP_HOST = "up.qiniu.com"
190-
191180

192181
class Test_get_file_crc32(unittest.TestCase):
193182

0 commit comments

Comments
 (0)