From e316722bb154ed99f347375e9f98e140ced33f00 Mon Sep 17 00:00:00 2001 From: Pablo Hoffman Date: Tue, 13 Jan 2009 11:55:20 +0000 Subject: [PATCH] updated doc: ref/emails.rst and topics/downloader-middleware.rst --HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40717 --- scrapy/trunk/docs/ref/email.rst | 4 +++- scrapy/trunk/docs/topics/downloader-middleware.rst | 13 ++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/scrapy/trunk/docs/ref/email.rst b/scrapy/trunk/docs/ref/email.rst index deca9a384..6862836b0 100644 --- a/scrapy/trunk/docs/ref/email.rst +++ b/scrapy/trunk/docs/ref/email.rst @@ -52,7 +52,9 @@ uses `Twisted non-blocking IO`_, like the rest of the framework. ``body`` is a string with the body of the message - ``attachs`` is a list of tuples containing (attach_name, mimetype, file_object) where: + ``attachs`` is an iterable of tuples (attach_name, mimetype, file_object) + where: + ``attach_name`` is a string with the name will appear on the emails attachment ``mimetype`` is the mimetype of the attachment ``file_object`` is a readable file object diff --git a/scrapy/trunk/docs/topics/downloader-middleware.rst b/scrapy/trunk/docs/topics/downloader-middleware.rst index 625a08cf9..71a102f08 100644 --- a/scrapy/trunk/docs/topics/downloader-middleware.rst +++ b/scrapy/trunk/docs/topics/downloader-middleware.rst @@ -50,9 +50,16 @@ If returns a Response object, Scrapy won't bother calling ANY other request or exception middleware, or the appropriate download function; it'll return that Response. Response middleware is always called on every response. -If returns a :class:`~scrapy.http.Request` object, returned request is used to -instruct a redirection. Redirection is handled inside middleware scope, and -original request don't finish until redirected request is completed. +If returns a :class:`~scrapy.http.Request` object, the returned request will be +re-scheduled (in the Scheduler) to be downloaded in the future. The callback of +the original request will always be called. If the new request has a callback +it will be called with the response downloaded, and the output of that callback +will then be passed to the original callback. If the new request doesn't have a +callback, the response downloaded will be just passed to the original request +callback. + +If returns an :exception:`IgnoreRequest` exception, the entire request will be +dropped completely and its callback never called. .. method:: process_response(request, response, spider)