server/sources/datafeed.py
changeset 10143 2eb06486273a
parent 10089 6346f53c85f1
child 10454 20f45a9b385c
child 10516 4c59409220b6
equal deleted inserted replaced
10142:f4a4556f23da 10143:2eb06486273a
   317         """Return stream linked by the given url:
   317         """Return stream linked by the given url:
   318         * HTTP urls will be normalized (see :meth:`normalize_url`)
   318         * HTTP urls will be normalized (see :meth:`normalize_url`)
   319         * handle file:// URL
   319         * handle file:// URL
   320         * other will be considered as plain content, useful for testing purpose
   320         * other will be considered as plain content, useful for testing purpose
   321         """
   321         """
       
   322         if headers is None:
       
   323             headers = {}
   322         if url.startswith('http'):
   324         if url.startswith('http'):
   323             url = self.normalize_url(url)
   325             url = self.normalize_url(url)
   324             if data:
   326             if data:
   325                 self.source.info('POST %s %s', url, data)
   327                 self.source.info('POST %s %s', url, data)
   326             else:
   328             else: