[Inteproxy-commits] r331 - in branches/streaming: . inteproxy
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Jan 3 17:29:57 CET 2012
Author: teichmann
Date: 2012-01-03 17:29:56 +0100 (Tue, 03 Jan 2012)
New Revision: 331
Modified:
branches/streaming/ChangeLog
branches/streaming/inteproxy/proxycore.py
Log:
Added doc strings to proxycore
Modified: branches/streaming/ChangeLog
===================================================================
--- branches/streaming/ChangeLog 2012-01-03 16:19:50 UTC (rev 330)
+++ branches/streaming/ChangeLog 2012-01-03 16:29:56 UTC (rev 331)
@@ -1,7 +1,7 @@
2012-01-03 Sascha L. Teichmann <sascha.teichmann at intevation.de>
- * inteproxy/chunkedwriter.py, inteproxy/transcoder.py:
- Added doc strings.
+ * inteproxy/chunkedwriter.py, inteproxy/transcoder.py,
+ inteproxy/proxycore.py: Added doc strings.
2012-01-02 Sascha L. Teichmann <sascha.teichmann at intevation.de>
Modified: branches/streaming/inteproxy/proxycore.py
===================================================================
--- branches/streaming/inteproxy/proxycore.py 2012-01-03 16:19:50 UTC (rev 330)
+++ branches/streaming/inteproxy/proxycore.py 2012-01-03 16:29:56 UTC (rev 331)
@@ -326,7 +326,9 @@
chunked = do_chunked)
def transfer_data_rewrite_chunked(self, response):
- """ TODO: Document me! """
+ """Transfers the incoming data of the origin server in chunks
+ and do url rewriting of the content at the same time.
+ """
transcoder_map = self.server.transcoder_map
prefix = self.server.get_inteproxy_url()
@@ -361,7 +363,9 @@
def transfer_chunked_rewrite(self, rewrite, read, write,
separator='>', length=4096):
- """ TODO: Document me! """
+ """Transfers data from read() to write() in chunks. The
+ data is splitted by a given separator.
+ """
read, write = self.wrap_read_write_debug(read, write)
writer = ChunkedTransferEncodingWriter(write, length)
@@ -431,11 +435,10 @@
write("0\r\n\r\n")
def have_to_rewrite(self):
- """ TODO: Document me! """
-
+ """Returns if url rewriting is necessary."""
return self.server.rewrite_urls and not urlparse.urlsplit(self.path)[0]
-
+
def rewrite_urls(self, response, force_rewrite=False):
"""Rewrites URLs in the response if enabled in the server
More information about the Inteproxy-commits
mailing list