Closed Bug 1754737 Opened 2 years ago Closed 2 years ago

Extract tunnel setup code, i.e. only CONNECT request handling from nsHttpConnection

Categories

(Core :: Networking: HTTP, task, P2)

task

Tracking

()

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: dragana, Assigned: dragana)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(2 files, 1 obsolete file)

Currently, this code is an internal part of nsHttpConnection, it can be moved to a separate class with a small interface.
It would be good to add some state machine to nsHttpConnection so that is easier to detect what does the connection does at the moment.

To explore: can we make this a layer under nsHttpConnection?

Assignee: nobody → dd.mozilla
Status: NEW → ASSIGNED
  • nsHttpConnection now has states. Currently only proxy setup phase is added to the states.
  • The states are used in nsHttpConnection::OnSocketWritable tto make the code more understandable.
  • Some pieces of selfcontained code are extracted from nsHttpConnection::OnHeadersAvailable, i.e. HandleTunnelResponse and HandleWebSocketResponse
Attachment #9263757 - Attachment is obsolete: true
Pushed by ddamjanovic@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/13ab95d47842
Add some structure to nsHttpConnection: r=necko-reviewers,kershaw
https://hg.mozilla.org/integration/autoland/rev/0cc869e52a2f
We do not need to keep info about the use of a tunnel in the state. r=necko-reviewers,kershaw
Regressions: 1756601
Flags: needinfo?(dd.mozilla)
Pushed by ddamjanovic@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/25650cac85f4
Add some structure to nsHttpConnection: r=necko-reviewers,kershaw
https://hg.mozilla.org/integration/autoland/rev/0377fb241cc9
We do not need to keep info about the use of a tunnel in the state. r=necko-reviewers,kershaw

Backed out 2 changesets (bug 1754737) for causing linux build bustage in netwerk/protocol/http/nsHttpConnection.

Backout link: https://hg.mozilla.org/integration/autoland/rev/d651411ec33c640ea7c0f3e581b829a974aa4a6c

Push with failures

Failure log

INFO -  /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpConnection.cpp: In member function 'nsresult mozilla::net::nsHttpConnection::CheckTunnelIsNeeded()':
[task 2022-03-23T00:50:07.894Z] 00:50:07    ERROR -  /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpConnection.cpp:2708:1: error: control reaches end of non-void function [-Werror=return-type]
[task 2022-03-23T00:50:07.894Z] 00:50:07     INFO -   }
[task 2022-03-23T00:50:07.894Z] 00:50:07     INFO -   ^
[task 2022-03-23T00:50:07.895Z] 00:50:07     INFO -  /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpConnection.cpp: In member function 'nsresult mozilla::net::nsHttpConnection::OnSocketReadable()':
[task 2022-03-23T00:50:07.895Z] 00:50:07  WARNING -  /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpConnection.cpp:1977:12: warning: 'rv' may be used uninitialized in this function [-Wmaybe-uninitialized]
[task 2022-03-23T00:50:07.897Z] 00:50:07     INFO -     nsresult rv;
[task 2022-03-23T00:50:07.897Z] 00:50:07     INFO -              ^~
[task 2022-03-23T00:50:07.898Z] 00:50:07     INFO -  cc1plus: all warnings being treated as errors
Flags: needinfo?(dd.mozilla)

I was fixed.

Flags: needinfo?(dd.mozilla)
Pushed by ddamjanovic@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0dc7d14597df
Add some structure to nsHttpConnection: r=necko-reviewers,kershaw
https://hg.mozilla.org/integration/autoland/rev/ba3b0e315592
We do not need to keep info about the use of a tunnel in the state. r=necko-reviewers,kershaw
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: