mirror of https://github.com/scrapy/scrapy.git
empty bodies does not require a body producer
This commit is contained in:
parent
db232da068
commit
ba6545555f
|
|
@ -54,7 +54,7 @@ class ScrapyAgent(object):
|
|||
url = urldefrag(request.url)[0]
|
||||
method = request.method
|
||||
headers = Headers(request.headers)
|
||||
bodyproducer = _RequestBodyProducer(request.body or '')
|
||||
bodyproducer = _RequestBodyProducer(request.body) if request.body else None
|
||||
agent = self._get_agent(request)
|
||||
start_time = time()
|
||||
d = agent.request(method, url, headers, bodyproducer)
|
||||
|
|
|
|||
Loading…
Reference in New Issue