equal
deleted
inserted
replaced
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: |