-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup: merge httpheader and httpfailure into model (#758)
These two small packages could easily be merged into the model package, since they're clearly model-like packages. Part of ooni/probe#2115
- Loading branch information
1 parent
928de50
commit 2d721ba
Showing
20 changed files
with
74 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package model | ||
|
||
// | ||
// Common HTTP definitions. | ||
// | ||
|
||
// Headers we use for measuring. | ||
const ( | ||
// HTTPHeaderAccept is the Accept header used for measuring. | ||
HTTPHeaderAccept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" | ||
|
||
// HTTPHeaderAcceptLanguage is the Accept-Language header used for measuring. | ||
HTTPHeaderAcceptLanguage = "en-US,en;q=0.9" | ||
|
||
// HTTPHeaderUserAgent is the User-Agent header used for measuring. The current header | ||
// is 13.7% of the browser population as of May 20, 2022 according to the | ||
// https://techblog.willshouse.com/2012/01/03/most-common-user-agents/ webpage. | ||
HTTPHeaderUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36" | ||
) | ||
|
||
// Additional strings used to report HTTP errors. They're currently only used by | ||
// experiment/whatsapp but may be used by more experiments in the future. They must | ||
// be addressable (i.e., var and not const) because experiments typically want to | ||
// take their addresses to fill fields with `string|null` type. | ||
var ( | ||
// HTTPUnexpectedStatusCode indicates that we re not getting | ||
// the expected (range of) HTTP status code(s). | ||
HTTPUnexpectedStatusCode = "http_unexpected_status_code" | ||
|
||
// HTTPUnexpectedRedirectURL indicates that the redirect URL | ||
// returned by the server is not the expected one. | ||
HTTPUnexpectedRedirectURL = "http_unexpected_redirect_url" | ||
) |
Oops, something went wrong.