Skip to content

Commit

Permalink
fix(measurex): make sure we don't redirect loop forever
Browse files Browse the repository at this point in the history
This is the most immediate fix to the issue described by
ooni/probe#1792.

So, the logic was actually miss the increment, which
would have been noticed with proper unit testing.

Anyway, I am not sure why the loop ensues in the first
time. By looking at the headers, it seems we're passing
the headers correctly.

So, even though this fix interrupts the loop, it still
remains the question of whether the loop is legit or
whether we're missing extra logic to properly redirect.
  • Loading branch information
bassosimone committed Sep 30, 2021
1 parent a89cdb6 commit ab2ddf8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/measurex/measurer.go
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,7 @@ type redirectionQueue struct {

func (r *redirectionQueue) append(URL ...string) {
r.q = append(r.q, URL...)
r.cnt++
}

func (r *redirectionQueue) popleft() (URL string) {
Expand Down

0 comments on commit ab2ddf8

Please sign in to comment.