
SAc           @   sF   d  Z  d  Z  d d k l Z d d k l Z d e f d     YZ d S(   s   Local File System producti(   t   filestream_iterator(   t   Filet   StreamingFilec           B   s   e  Z d  Z d   Z RS(   s@    wrapper around OFS.Image.File that does streaming from the filec         C   s   d } | i  d |  i  | i  d |  i  |  i | j  p | d j o2 z  t |  i d  } | i   SWd | i   Xn t |  i d  Sd S(   s       XXX FIXME: this doesn't have range support etc.
               Note: this relies on _wrap_ob(self) having been called by now.
	i   i   s   Content-Lengths   Content-Typet   rbNi   (	   t	   setHeadert   sizet   content_typet   Nonet   opent   _local_patht   readt   closeR    (   t   selft   REQUESTt   RESPONSEt	   thresholdt   f(    (    s+   /srv/Zope/Products/LocalFS/StreamingFile.pyt
   index_html	   s    (   t   __name__t
   __module__t   __doc__R   (    (    (    s+   /srv/Zope/Products/LocalFS/StreamingFile.pyR      s   N(   R   t   ZPublisher.IteratorsR    t	   OFS.ImageR   R   (    (    (    s+   /srv/Zope/Products/LocalFS/StreamingFile.pyt   <module>   s   