commit 29eecdfae394f18ac0b631fca921f0a90d114623 Author: David Fifield david@bamsoftware.com Date: Mon Jun 9 21:05:48 2014 -0700
Change OPEN_BLOCKING|OPEN_UNBUFFERED to OPEN_BLOCKING.
Georg reports that Mozilla is doing so internally anyway. We were never really getting OPEN_UNBUFFERED.
https://trac.torproject.org/projects/tor/ticket/11183#comment:27 https://hg.mozilla.org/mozilla-central/file/fc70d6d9a9b0/netwerk/base/src/ns...
All OPEN_UNBUFFERED is supposed to do is guarantee that the stream support ReadSegments/WriteSegments/WriteFrom. It doesn't hurt if it does, but we don't use them.
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interf... https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interf... --- firefox/components/main.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/firefox/components/main.js b/firefox/components/main.js index a84b2d7..4265f97 100644 --- a/firefox/components/main.js +++ b/firefox/components/main.js @@ -226,8 +226,7 @@ MeekHTTPHelper.LocalConnectionHandler.prototype = {
returnResponse: function(resp) { // dump("returnResponse " + JSON.stringify(resp) + "\n"); - outputStream = this.transport.openOutputStream( - Components.interfaces.nsITransport.OPEN_BLOCKING | Components.interfaces.nsITransport.OPEN_UNBUFFERED, 0, 0); + outputStream = this.transport.openOutputStream(Components.interfaces.nsITransport.OPEN_BLOCKING, 0, 0); var output = Components.classes["@mozilla.org/binaryoutputstream;1"] .createInstance(Components.interfaces.nsIBinaryOutputStream); output.setOutputStream(outputStream); @@ -284,8 +283,7 @@ MeekHTTPHelper.RequestReader = function(transport, callback) { this.callback = callback;
this.curThread = Components.classes["@mozilla.org/thread-manager;1"].getService().currentThread; - this.inputStream = this.transport.openInputStream( - Components.interfaces.nsITransport.OPEN_BLOCKING | Components.interfaces.nsITransport.OPEN_UNBUFFERED, 0, 0); + this.inputStream = this.transport.openInputStream(Components.interfaces.nsITransport.OPEN_BLOCKING, 0, 0);
this.state = this.STATE_READING_LENGTH; // Initially size the buffer to read the 4-byte length.
tor-commits@lists.torproject.org