mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
make sure to set host header
This commit is contained in:
parent
76b114f584
commit
d35ef18889
1 changed files with 3 additions and 2 deletions
|
@ -44,8 +44,8 @@ MIME_BOUNDARY = "Anki-sync-boundary"
|
||||||
SYNC_URL = "http://anki.ichi2.net/sync/"
|
SYNC_URL = "http://anki.ichi2.net/sync/"
|
||||||
SYNC_HOST = "anki.ichi2.net"; SYNC_PORT = 80
|
SYNC_HOST = "anki.ichi2.net"; SYNC_PORT = 80
|
||||||
# testing
|
# testing
|
||||||
SYNC_URL = "http://localhost:8001/sync/"
|
#SYNC_URL = "http://localhost:8001/sync/"
|
||||||
SYNC_HOST = "localhost"; SYNC_PORT = 8001
|
#SYNC_HOST = "localhost"; SYNC_PORT = 8001
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
|
@ -974,6 +974,7 @@ and cards.id in %s""" % ids2str([c[0] for c in cards])))
|
||||||
h.putheader('Content-type', 'multipart/form-data; boundary=%s' %
|
h.putheader('Content-type', 'multipart/form-data; boundary=%s' %
|
||||||
MIME_BOUNDARY)
|
MIME_BOUNDARY)
|
||||||
h.putheader('Content-length', str(size))
|
h.putheader('Content-length', str(size))
|
||||||
|
h.putheader('Host', SYNC_HOST)
|
||||||
h.endheaders()
|
h.endheaders()
|
||||||
dst = h._conn.sock.makefile("wb", 65536)
|
dst = h._conn.sock.makefile("wb", 65536)
|
||||||
# dump file
|
# dump file
|
||||||
|
|
Loading…
Reference in a new issue