Closed Bug 1755660 Opened 3 years ago Closed 2 years ago

Proxy testing: Testing connection to origin servers via a proxy

Categories

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

task

Tracking

()

RESOLVED FIXED

People

(Reporter: dragana, Assigned: dragana)

References

(Blocks 1 open bug, Regressed 2 open bugs)

Details

(Whiteboard: [necko-triaged])

Attachments

(6 files, 1 obsolete file)

  • An HTTP request with responses: 200, 404.
  • An HTTP request with a redirect
  • 2 HTTP requests to the same origin over an HTTP/2 proxy.
    Check that the proxy connection is reused.
  • 2 HTTP requests to the same origin over an HTTP/2 proxy. One of the requests uses the anonymous flag.
    Check that the proxy connection is not reused.
  • 2 HTTP requests to the same origin over an HTTP/2 proxy with a different triggering principal.
    Check that the proxy connection is not reused.
  • A connection to the proxy fails with a non-authentication failure. (test at least 2 HTTP requests).
  • Test a long post and check progress notifications as well.
  • Test a post with a slower writer.
  • Test a long response.
  • Test a slove response reader.
  • Test canceling an HTTP request:
    • as soon as the nsHttpChannel is open and a connection to the proxy does not exist already,
    • as soon as the nsHttpChannel is open and a connection to the proxy exists (only HTTP/2 proxy),
    • after the request is sent but before the response is received
    • while receiving a response.
      For the above tests check that the HTTP/2 connection to the proxy is not closed.
  • Network connection breaks with different errors in different stages of a request and proxy setup.
Assignee: nobody → dd.mozilla
Status: NEW → ASSIGNED

Also AltSvc is disabled for HTTP proxies - addapt the test.

Attachment #9283645 - Attachment is obsolete: true

The following tests should be covered with currently submitted patches or already existing tests:

  • [x] An HTTP request with responses: 200, 404.
  • [ ] An HTTP request with a redirect
  • [x] 2 HTTP requests to the same origin over an HTTP/2 proxy.
    Check that the proxy connection is reused.
  • [x] 2 HTTP requests to the same origin over an HTTP/2 proxy. One of the requests uses the anonymous flag.
    Check that the proxy connection is not reused.
  • [x] 2 HTTP requests to the same origin over an HTTP/2 proxy with a different triggering principal.
    Check that the proxy connection is not reused.
  • [x] A connection to the proxy fails with a non-authentication failure. (test at least 2 HTTP requests).
  • [partially, only for HTTP2 server] Test a long post and check progress notifications as well.
  • [ ] Test a post with a slower writer.
  • [x] Test a long response.
  • [x] Test a slove response reader.
  • [ ] Test canceling an HTTP request:
    • as soon as the nsHttpChannel is open and a connection to the proxy does not exist already,
    • as soon as the nsHttpChannel is open and a connection to the proxy exists (only HTTP/2 proxy),
    • after the request is sent but before the response is received
    • while receiving a response.
      For the above tests check that the HTTP/2 connection to the proxy is not closed.
  • [ ] Network connection breaks with different errors in different stages of a request and proxy setup.

The patch also changes test_server.js to await server shutdown when necessary.

We move from http.get to http.request to be able to pass the method to
the proxied request.
We alsoread the data from the stream and pipe it to the new request.

Depends on D155334

Attachment #9291064 - Attachment description: WIP: Bug 1755660 - Add proxy test for POST request with a slow writer r=#necko → Bug 1755660 - Add proxy test for POST request with a slow writer r=#necko
Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/cd1684b91384 Test redirected HTTPS requests through proxy r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/8a9725c09d40 Allow node proxies to handle POST requests r=necko-reviewers,dragana https://hg.mozilla.org/integration/autoland/rev/06b90196355e Add proxy test for POST request with a slow writer r=necko-reviewers,dragana
Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/60fc8d3f8152 Add tests for cancelling proxied channels r=necko-reviewers,kershaw
Pushed by valentin.gosu@gmail.com: https://hg.mozilla.org/integration/autoland/rev/ac2c4ef5bde1 Add tests for cancelling proxied channels r=necko-reviewers,kershaw
Regressions: 1795694

Hi Kershaw, my appolgies but may I ask you to land 2 patches from me? I will not have time to fix them. Thank you

Flags: needinfo?(kershaw)
Attachment #9283471 - Attachment description: Add tests for testing HTTP/2 to the origin server through a HTTP/2 proxy. → Bug 1755660 - Add tests for testing HTTP/2 to the origin server through a HTTP/2 proxy, r=#necko
Pushed by kjang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c1a7df2f329c Add tests for testing HTTP/2 to the origin server through a HTTP/2 proxy, r=necko-reviewers,valentin
Regressions: 1800080
Flags: needinfo?(valentin.gosu)
Attachment #9287475 - Attachment description: Test progress notification with and without proxy → Bug 1755660 - Test progress notification with and without proxy
Pushed by kjang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f36319780923 Test progress notification with and without proxy r=necko-reviewers,valentin
Regressions: 1815938

I assume we can close this now?

Yes, all tests are landed.

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Flags: needinfo?(kershaw)
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: