Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#6858 closed task (fixed)

HTTP Protocol Helper

Reported by: isis Owned by: hellais
Priority: Medium Milestone:
Component: Archived/Ooni Version:
Severity: Keywords: ooni_test_helpers
Cc: ioerror, isis Actual Points:
Parent ID: #6857 Points:
Reviewer: Sponsor:

Description

This has already been written by hellais. This ticket is to keep track of the helper as bugs in OONI surface and changes are made.

Child Tickets

Change History (4)

comment:1 Changed 8 years ago by isis

The HTTP helper, /ooni/protocols/http.py, tries to do "from twisted.web.client import RedirectAgent" without checking Twisted's version or the client OS version. In Debian stable, the latest version of Twisted in 10.1.0, in which the RedirectAgent class does not exist. Also, because the HTTP helper tries to do imports without knowing if they will be used or not, this prevents ooniprobe.py from running entirely.

If we are planning for Twisted-12.x, we should include some sort of install script which gets and builds it for us.

Either way, we should always do smart checking on imports to avoid breaking without explaining to the user what is going on, and we should avoid importing uneccessary modules.

comment:2 Changed 8 years ago by hellais

I have added in commit 302dd54259fc6e69d3f276bcb458350344552887 something to catch errors in importing of RedirectAgent. If we fail to import RedirectAgent it will display a warning saying:

"Warning! You are running an old version of twisted"\
"(<= 10.1). I will not be able to follow redirects."\
"This may make the testing less accurate."

It will also write a similar error to the report file so that we know that this test was run under different testing conditions.

comment:3 Changed 8 years ago by hellais

Resolution: fixed
Status: newclosed

I propose we close this ticket and open tickets on a case by case basis, I do not think it is particularly useful to have one master ticket for all things related to HTTP Template.

comment:4 Changed 8 years ago by hellais

Keywords: ooni_test_helpers added; helpers protocol ooni-probe removed
Note: See TracTickets for help on using tickets.