Yep, that worked. Now I get the request header.
Output:
UPDATE: 163 of 163
ERROR CODE: (302, True)
REPLY HEADER: Server === nginx/0.7.63
REPLY HEADER: Date === Wed, 22 Sep 2010 12:44:44 GMT
REPLY HEADER: Content-Type === text/html; charset=UTF-8
REPLY HEADER: Connection === close
REPLY HEADER: Set-cookie === sf.consume=0fc84a4cf5c340bc4b568a7694abce97a8a762edgAJ9cQEoVQhfZXhwaXJlc3ECY2RhdGV0aW1lCmRhdGV0aW1lCnEDVQoH9gETAw4HAAAAhVJxBFUDX2lkcQVVIGMwNzM1ZWU5YzVlZjFlYjk4OTU5MWI0ZTg3YjZlZDRhcQZVDl9hY2Nlc3NlZF90aW1lcQdHQdMmfo8Q+CtVDl9jcmVhdGlvbl90aW1lcQhHQdMmfo8Q+Cd1Lg==; expires=Tue, 19-Jan-2038 03:14:07 GMT; Path=/
REPLY HEADER: Location === http://sourceforge.net/projects/python-jake/files/betas/Jake-PyQT4-0.1.zip/download
REPLY HEADER: Content-Length === 163
REDIRECT
: PyQt4.
QtCore.
QUrl(u
'http://sourceforge.net/projects/python-jake/files/betas/Jake-PyQT4-0.1.zip/download')UPDATE: 697 of 17529
UPDATE: 2145 of 17529
UPDATE: 3593 of 17529
UPDATE: 6489 of 17529
UPDATE: 7937 of 17529
UPDATE: 9385 of 17529
UPDATE: 10833 of 17529
UPDATE: 12281 of 17529
UPDATE: 13729 of 17529
UPDATE: 15177 of 17529
UPDATE: 16625 of 17529
UPDATE: 17529 of 17529
ERROR CODE: (200, True)
REPLY HEADER: Server === nginx/0.7.63
REPLY HEADER: Date === Wed, 22 Sep 2010 12:44:47 GMT
REPLY HEADER: Content-Type === text/html; charset=utf-8
REPLY HEADER: Connection === close
REPLY HEADER: Pragma === no-cache
REPLY HEADER: Cache-Control === no-cache
REPLY HEADER: Set-cookie === VISITOR=4c99fa3c86502b0357001464; expires="Sat, 19-Sep-2020 12:44:47 GMT"; httponly; Max-Age=315360000; Path=/
sf.consume=be407794209dedb983a3e46c45e09112972ef415gAJ9cQEoVQhfZXhwaXJlc3ECY2RhdGV0aW1lCmRhdGV0aW1lCnEDVQoH9gETAw4HAAAAhVJxBFUFcHJlZnNxBX1xBlUOdXNlc19yZWxhdGlvbnNxB4lVB3ZlcnNpb25xCFUBMlUDa2V5cQlVGDRjOTlmYTNjODY1MDJiMDM1NzAwMTQ2NHEKVQNfaWRxC1UgZmRmOGIxMWEyZDQ2ZDkzMjljMTU1NjY5MTc0ZTJiMDdxDFUOX2FjY2Vzc2VkX3RpbWVxDUdB0yZ+j9wyalUOX2NyZWF0aW9uX3RpbWVxDkdB0yZ+j9wxanUu; expires=Tue, 19-Jan-2038 03:14:07 GMT; Path=/
REPLY HEADER: Content-Length === 17529
REQUEST HEADER: Cookie === sf.consume=0fc84a4cf5c340bc4b568a7694abce97a8a762edgAJ9cQEoVQhfZXhwaXJlc3ECY2RhdGV0aW1lCmRhdGV0aW1lCnEDVQoH9gETAw4HAAAAhVJxBFUDX2lkcQVVIGMwNzM1ZWU5YzVlZjFlYjk4OTU5MWI0ZTg3YjZlZDRhcQZVDl9hY2Nlc3NlZF90aW1lcQdHQdMmfo8Q+CtVDl9jcmVhdGlvbl90aW1lcQhHQdMmfo8Q+Cd1Lg==
ERROR CODE: (200, True)
REPLY HEADER: Server === nginx/0.7.63
REPLY HEADER: Date === Wed, 22 Sep 2010 12:44:47 GMT
REPLY HEADER: Content-Type === text/html; charset=utf-8
REPLY HEADER: Connection === close
REPLY HEADER: Pragma === no-cache
REPLY HEADER: Cache-Control === no-cache
REPLY HEADER: Set-cookie === VISITOR=4c99fa3c86502b0357001464; expires="Sat, 19-Sep-2020 12:44:47 GMT"; httponly; Max-Age=315360000; Path=/
sf.consume=be407794209dedb983a3e46c45e09112972ef415gAJ9cQEoVQhfZXhwaXJlc3ECY2RhdGV0aW1lCmRhdGV0aW1lCnEDVQoH9gETAw4HAAAAhVJxBFUFcHJlZnNxBX1xBlUOdXNlc19yZWxhdGlvbnNxB4lVB3ZlcnNpb25xCFUBMlUDa2V5cQlVGDRjOTlmYTNjODY1MDJiMDM1NzAwMTQ2NHEKVQNfaWRxC1UgZmRmOGIxMWEyZDQ2ZDkzMjljMTU1NjY5MTc0ZTJiMDdxDFUOX2FjY2Vzc2VkX3RpbWVxDUdB0yZ+j9wyalUOX2NyZWF0aW9uX3RpbWVxDkdB0yZ+j9wxanUu; expires=Tue, 19-Jan-2038 03:14:07 GMT; Path=/
REPLY HEADER: Content-Length === 17529
REQUEST HEADER: Cookie === sf.consume=0fc84a4cf5c340bc4b568a7694abce97a8a762edgAJ9cQEoVQhfZXhwaXJlc3ECY2RhdGV0aW1lCmRhdGV0aW1lCnEDVQoH9gETAw4HAAAAhVJxBFUDX2lkcQVVIGMwNzM1ZWU5YzVlZjFlYjk4OTU5MWI0ZTg3YjZlZDRhcQZVDl9hY2Nlc3NlZF90aW1lcQdHQdMmfo8Q+CtVDl9jcmVhdGlvbl90aW1lcQhHQdMmfo8Q+Cd1Lg==
UPDATE: 163 of 163
ERROR CODE: (302, True)
REPLY HEADER: Server === nginx/0.7.63
REPLY HEADER: Date === Wed, 22 Sep 2010 12:44:44 GMT
REPLY HEADER: Content-Type === text/html; charset=UTF-8
REPLY HEADER: Connection === close
REPLY HEADER: Set-cookie === sf.consume=0fc84a4cf5c340bc4b568a7694abce97a8a762edgAJ9cQEoVQhfZXhwaXJlc3ECY2RhdGV0aW1lCmRhdGV0aW1lCnEDVQoH9gETAw4HAAAAhVJxBFUDX2lkcQVVIGMwNzM1ZWU5YzVlZjFlYjk4OTU5MWI0ZTg3YjZlZDRhcQZVDl9hY2Nlc3NlZF90aW1lcQdHQdMmfo8Q+CtVDl9jcmVhdGlvbl90aW1lcQhHQdMmfo8Q+Cd1Lg==; expires=Tue, 19-Jan-2038 03:14:07 GMT; Path=/
REPLY HEADER: Location === http://sourceforge.net/projects/python-jake/files/betas/Jake-PyQT4-0.1.zip/download
REPLY HEADER: Content-Length === 163
REDIRECT: PyQt4.QtCore.QUrl(u'http://sourceforge.net/projects/python-jake/files/betas/Jake-PyQT4-0.1.zip/download')
UPDATE: 697 of 17529
UPDATE: 2145 of 17529
UPDATE: 3593 of 17529
UPDATE: 6489 of 17529
UPDATE: 7937 of 17529
UPDATE: 9385 of 17529
UPDATE: 10833 of 17529
UPDATE: 12281 of 17529
UPDATE: 13729 of 17529
UPDATE: 15177 of 17529
UPDATE: 16625 of 17529
UPDATE: 17529 of 17529
ERROR CODE: (200, True)
REPLY HEADER: Server === nginx/0.7.63
REPLY HEADER: Date === Wed, 22 Sep 2010 12:44:47 GMT
REPLY HEADER: Content-Type === text/html; charset=utf-8
REPLY HEADER: Connection === close
REPLY HEADER: Pragma === no-cache
REPLY HEADER: Cache-Control === no-cache
REPLY HEADER: Set-cookie === VISITOR=4c99fa3c86502b0357001464; expires="Sat, 19-Sep-2020 12:44:47 GMT"; httponly; Max-Age=315360000; Path=/
sf.consume=be407794209dedb983a3e46c45e09112972ef415gAJ9cQEoVQhfZXhwaXJlc3ECY2RhdGV0aW1lCmRhdGV0aW1lCnEDVQoH9gETAw4HAAAAhVJxBFUFcHJlZnNxBX1xBlUOdXNlc19yZWxhdGlvbnNxB4lVB3ZlcnNpb25xCFUBMlUDa2V5cQlVGDRjOTlmYTNjODY1MDJiMDM1NzAwMTQ2NHEKVQNfaWRxC1UgZmRmOGIxMWEyZDQ2ZDkzMjljMTU1NjY5MTc0ZTJiMDdxDFUOX2FjY2Vzc2VkX3RpbWVxDUdB0yZ+j9wyalUOX2NyZWF0aW9uX3RpbWVxDkdB0yZ+j9wxanUu; expires=Tue, 19-Jan-2038 03:14:07 GMT; Path=/
REPLY HEADER: Content-Length === 17529
REQUEST HEADER: Cookie === sf.consume=0fc84a4cf5c340bc4b568a7694abce97a8a762edgAJ9cQEoVQhfZXhwaXJlc3ECY2RhdGV0aW1lCmRhdGV0aW1lCnEDVQoH9gETAw4HAAAAhVJxBFUDX2lkcQVVIGMwNzM1ZWU5YzVlZjFlYjk4OTU5MWI0ZTg3YjZlZDRhcQZVDl9hY2Nlc3NlZF90aW1lcQdHQdMmfo8Q+CtVDl9jcmVhdGlvbl90aW1lcQhHQdMmfo8Q+Cd1Lg==
ERROR CODE: (200, True)
REPLY HEADER: Server === nginx/0.7.63
REPLY HEADER: Date === Wed, 22 Sep 2010 12:44:47 GMT
REPLY HEADER: Content-Type === text/html; charset=utf-8
REPLY HEADER: Connection === close
REPLY HEADER: Pragma === no-cache
REPLY HEADER: Cache-Control === no-cache
REPLY HEADER: Set-cookie === VISITOR=4c99fa3c86502b0357001464; expires="Sat, 19-Sep-2020 12:44:47 GMT"; httponly; Max-Age=315360000; Path=/
sf.consume=be407794209dedb983a3e46c45e09112972ef415gAJ9cQEoVQhfZXhwaXJlc3ECY2RhdGV0aW1lCmRhdGV0aW1lCnEDVQoH9gETAw4HAAAAhVJxBFUFcHJlZnNxBX1xBlUOdXNlc19yZWxhdGlvbnNxB4lVB3ZlcnNpb25xCFUBMlUDa2V5cQlVGDRjOTlmYTNjODY1MDJiMDM1NzAwMTQ2NHEKVQNfaWRxC1UgZmRmOGIxMWEyZDQ2ZDkzMjljMTU1NjY5MTc0ZTJiMDdxDFUOX2FjY2Vzc2VkX3RpbWVxDUdB0yZ+j9wyalUOX2NyZWF0aW9uX3RpbWVxDkdB0yZ+j9wxanUu; expires=Tue, 19-Jan-2038 03:14:07 GMT; Path=/
REPLY HEADER: Content-Length === 17529
REQUEST HEADER: Cookie === sf.consume=0fc84a4cf5c340bc4b568a7694abce97a8a762edgAJ9cQEoVQhfZXhwaXJlc3ECY2RhdGV0aW1lCmRhdGV0aW1lCnEDVQoH9gETAw4HAAAAhVJxBFUDX2lkcQVVIGMwNzM1ZWU5YzVlZjFlYjk4OTU5MWI0ZTg3YjZlZDRhcQZVDl9hY2Nlc3NlZF90aW1lcQdHQdMmfo8Q+CtVDl9jcmVhdGlvbl90aW1lcQhHQdMmfo8Q+Cd1Lg==
To copy to clipboard, switch view to plain text mode
Code:
def downloadFinished(self, reply):
redirect = reply.attribute(QNetworkRequest.RedirectionTargetAttribute).toUrl()
print "ERROR CODE: " + str(reply.attribute(QNetworkRequest.HttpStatusCodeAttribute).toInt())
for item in reply.rawHeaderList():
print "REPLY HEADER: " + str(item) + " === " + reply.rawHeader(str(item))
for item in reply.request().rawHeaderList():
print "REQUEST HEADER: " + str(item) + " === " + reply.request().rawHeader(str(item))
if not redirect.isEmpty():
print "REDIRECT: " + str(redirect)
request = QNetworkRequest(redirect)
self.reply = self.manager.get(request)
self.reply.downloadProgress.connect(self.updateDataReadProgress)
else:
self.
updateFile = QFile(self.
downloadPath) self.updateFile.write(self.reply.readAll())
self.updateFile.close()
self.reply.deleteLater()
self.manager.deleteLater()
reply.deleteLater()
def downloadFinished(self, reply):
redirect = reply.attribute(QNetworkRequest.RedirectionTargetAttribute).toUrl()
print "ERROR CODE: " + str(reply.attribute(QNetworkRequest.HttpStatusCodeAttribute).toInt())
for item in reply.rawHeaderList():
print "REPLY HEADER: " + str(item) + " === " + reply.rawHeader(str(item))
for item in reply.request().rawHeaderList():
print "REQUEST HEADER: " + str(item) + " === " + reply.request().rawHeader(str(item))
if not redirect.isEmpty():
print "REDIRECT: " + str(redirect)
request = QNetworkRequest(redirect)
self.reply = self.manager.get(request)
self.reply.downloadProgress.connect(self.updateDataReadProgress)
else:
self.updateFile = QFile(self.downloadPath)
self.updateFile.open(QIODevice.WriteOnly)
self.updateFile.write(self.reply.readAll())
self.updateFile.close()
self.reply.deleteLater()
self.manager.deleteLater()
reply.deleteLater()
To copy to clipboard, switch view to plain text mode
So, I do send the cookie, but the app just stays there. No progress, no further replies, no nothing.
Bookmarks