mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-23 14:52:26 +00:00
remove unused HTTPClientHEADFactory
This commit is contained in:
parent
d018a07bf0
commit
bd1e4507ee
@ -66,21 +66,6 @@ class MyGetter(client.HTTPPageGetter):
|
||||
handleStatus_206 = lambda self: self.handleStatus_200() # PARTIAL_CONTENT
|
||||
handleStatus_304 = lambda self: self.handleStatus_200() # NOT_MODIFIED
|
||||
|
||||
class HTTPClientHEADFactory(client.HTTPClientFactory):
|
||||
protocol = MyGetter
|
||||
|
||||
def noPage(self, reason):
|
||||
# Twisted-2.5.0 and earlier had a bug, in which they would raise an
|
||||
# exception when the response to a HEAD request had no body (when in
|
||||
# fact they are defined to never have a body). This was fixed in
|
||||
# Twisted-8.0 . To work around this, we catch the
|
||||
# PartialDownloadError and make it disappear.
|
||||
if (reason.check(client.PartialDownloadError)
|
||||
and self.method.upper() == "HEAD"):
|
||||
self.page("")
|
||||
return
|
||||
return client.HTTPClientFactory.noPage(self, reason)
|
||||
|
||||
class HTTPClientGETFactory(client.HTTPClientFactory):
|
||||
protocol = MyGetter
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user