Skip to content

Commit

Permalink
minipipeline: fix computing HTTPResponseBodyIsTruncated (#1481)
Browse files Browse the repository at this point in the history
Part of ooni/probe#1336

See #1475 (comment)

While there, generate missing minipipeline test cases.

While there, update minipipeline test cases.
  • Loading branch information
bassosimone authored Jan 31, 2024
1 parent 1579af3 commit bf471b3
Show file tree
Hide file tree
Showing 19 changed files with 3,587 additions and 13 deletions.
2 changes: 1 addition & 1 deletion internal/minipipeline/observation.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ func (c *WebObservationsContainer) IngestHTTPRoundTripEvents(evs ...*model.Archi
if ev.Failure == nil {
obs.HTTPResponseStatusCode = optional.Some(ev.Response.Code)
obs.HTTPResponseBodyLength = optional.Some(int64(len(ev.Response.Body)))
obs.HTTPResponseBodyIsTruncated = optional.Some(ev.Request.BodyIsTruncated)
obs.HTTPResponseBodyIsTruncated = optional.Some(ev.Response.BodyIsTruncated)
obs.HTTPResponseHeadersKeys = utilsExtractHTTPHeaderKeys(ev.Response.Headers)
obs.HTTPResponseTitle = optional.Some(measurexlite.WebGetTitle(string(ev.Response.Body)))
obs.HTTPResponseLocation = utilsExtractHTTPLocation(ev.Response.Headers)
Expand Down
Loading

0 comments on commit bf471b3

Please sign in to comment.