r251 - /debtorrent/branches/http1.1/DebTorrent/HTTPHandler.py
camrdale-guest at users.alioth.debian.org
camrdale-guest at users.alioth.debian.org
Wed Aug 15 07:02:30 UTC 2007
Author: camrdale-guest
Date: Wed Aug 15 07:02:30 2007
New Revision: 251
URL: http://svn.debian.org/wsvn/debtorrent/?sc=1&rev=251
Log:
Return DEBTORRENT requests in any order.
Modified:
debtorrent/branches/http1.1/DebTorrent/HTTPHandler.py
Modified: debtorrent/branches/http1.1/DebTorrent/HTTPHandler.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/branches/http1.1/DebTorrent/HTTPHandler.py?rev=251&op=diff
==============================================================================
--- debtorrent/branches/http1.1/DebTorrent/HTTPHandler.py (original)
+++ debtorrent/branches/http1.1/DebTorrent/HTTPHandler.py Wed Aug 15 07:02:30 2007
@@ -282,6 +282,8 @@
elif self.protocol != "HTTP":
logger.error("Unsupported protocol (%r)", version)
return None
+ else:
+ self.version = (1, 0)
elif len(words) == 2:
# Old HTTP 0.9 connections don't include the version and only support GET
@@ -392,11 +394,10 @@
else:
if self.protocol == "DEBTORRENT":
# DEBTORRENT requests get sent immediately
- #self.requests.remove(httpreq)
- #self.send_answer(r, httpreq.header, httpreq.command,
- # httpreq.path, httpreq.encoding,
- # httpreq.headers)
- httpreq.save_answer(r)
+ self.requests.remove(httpreq)
+ self.send_answer(r, httpreq.header, httpreq.command,
+ httpreq.path, httpreq.encoding,
+ httpreq.headers)
else:
httpreq.save_answer(r)
@@ -466,7 +467,7 @@
r.write(self.handler.protocol + ' ' + str(responsecode) + ' ' +
responsestring + '\r\n')
elif self.protocol == "DEBTORRENT":
- r.write('DEBTORRENT/'+DEBTORRENT_PROTOCOL+' '+
+ r.write('DEBTORRENT/'+DEBTORRENT_PROTOCOL+' '+path+' '+
str(responsecode)+' '+responsestring+'\r\n')
# Write the individual headers
More information about the Debtorrent-commits
mailing list