https proxying instability

RESOLVED FIXED in mozilla33

Status

()

Core
Networking: HTTP
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: mcmanus, Assigned: mcmanus)

Tracking

33 Branch
mozilla33
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

A few problems have been found with https proxying resulting in the usual mishmash of hung sockets and corrupt data on uploads :)
Created attachment 8444724 [details] [diff] [review]
part 2 tlsproxy incomplete upload flushes need to be rescheduled r= hurley
Assignee: nobody → mcmanus
Status: NEW → ASSIGNED
Created attachment 8444728 [details] [diff] [review]
part 1 nsPipe can turn failures into OK, consider that in the tlsproxy code
Created attachment 8444729 [details] [diff] [review]
part 3 tunnel https/h1 over h2 could duplicate bytes in upload and corrupt data
Attachment #8444728 - Flags: review?(hurley)
Attachment #8444724 - Flags: review?(hurley)
Attachment #8444729 - Flags: review?(hurley)
https://tbpl.mozilla.org/?tree=Try&rev=c3aa023be67b
Attachment #8444728 - Flags: review?(hurley) → review+
Attachment #8444724 - Flags: review?(hurley) → review+
Attachment #8444729 - Flags: review?(hurley) → review+
I actually exported the wrong rev of part 1 - this is the interdiff


diff --git a/netwerk/protocol/http/TunnelUtils.cpp b/netwerk/protocol/http/TunnelUtils.cpp
index 18ce103..4fcae9a 100644
--- a/netwerk/protocol/http/TunnelUtils.cpp
+++ b/netwerk/protocol/http/TunnelUtils.cpp
@@ -344,17 +344,17 @@ TLSFilterTransaction::WriteSegments(nsAHttpSegmentWriter *aWriter,
   LOG(("TLSFilterTransaction::WriteSegments %p max=%d\n", this, aCount));
 
   if (!mTransaction) {
     return NS_ERROR_UNEXPECTED;
   }
 
   mSegmentWriter = aWriter;
   nsresult rv = mTransaction->WriteSegments(this, aCount, outCountWritten);
-  if (NS_SUCCEEDED(rv) && NS_FAILED(mFilterReadCode) && !outCountWritten) {
+  if (NS_SUCCEEDED(rv) && NS_FAILED(mFilterReadCode) && !(*outCountWritten)) {
     // nsPipe turns failures into silent OK.. undo that!
     rv = mFilterReadCode;
   }
   LOG(("TLSFilterTransaction %p called trans->WriteSegments rv=%x %d\n",
        this, rv, *outCountWritten));
   return rv;
 }
remote:   https://hg.mozilla.org/integration/mozilla-inbound/rev/1f5625271af6
remote:   https://hg.mozilla.org/integration/mozilla-inbound/rev/650a94cde2d8
remote:   https://hg.mozilla.org/integration/mozilla-inbound/rev/9cdded2baf00
https://hg.mozilla.org/mozilla-central/rev/1f5625271af6
https://hg.mozilla.org/mozilla-central/rev/650a94cde2d8
https://hg.mozilla.org/mozilla-central/rev/9cdded2baf00
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.