-
-
Notifications
You must be signed in to change notification settings - Fork 406
Downloader helper user agent #227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or 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
80eda15
to
cc65201
Compare
…aving cli login,logout,validate removed
…truct wihth String method
…ckage from global to version
having removed cli login,logout,validate
…rs and modify test accordingly
…eaders build from VersionInfo struct in cli InitInstance func
…y for ArduinoCoreServerImpl
cc65201
to
e2586ca
Compare
… go-task install script
masci
suggested changes
Jun 11, 2019
…available in all cli subpackages and not onli in cli
masci
approved these changes
Jun 11, 2019
cmaglie
approved these changes
Jun 13, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Maybe there is a chance to reduce arguments by putting http.Header
into Instance
. This may be considered for a future API expansion.
Closed
mastrolinux
pushed a commit
that referenced
this pull request
Jul 16, 2019
* add global variables and Info struct in order to inject build time values via ldflags * replace cli.AppName with global variable global.GetAppName() getter * replaced cli.Version var with global getter * add .idea to .gitignore * re organize imports * add license to global.go * add hardcoded fallback version string * organize imports step2 * organize imports step3 * replace cli.AppName with global variable global.GetAppName() getter * add User-Agent header to downloader helper configuration * add testing for user agent-string generation * re organize imports * refactor global package into version package and rename and replace having cli login,logout,validate removed * refactor versioning variables in version package and implement Info struct wihth String method * refactor Info cosntructor to use directly package vars and renamed package from global to version * replace package name from global to version * solve package name clash for version and cli/version * replace application name getter with VersionInfo.Application field having removed cli login,logout,validate * search and replace version string getter with VersionInfo.VersionString field * implement empty http.Header struct propagation from cli to resources * align downloader helper to use propagated http.Header from upper layers and modify test accordingly * align daemon to use empty http.Header as struct field in ArduinoCoreServerImpl * clean inside cobra commands for empty http.Header struct and inject headers build from VersionInfo struct in cli InitInstance func * remove unused runDaemonCommand in daemon * add user agent specific for daemon mode via DownloaderHeaders property for ArduinoCoreServerImpl * add testing information in README.md * removed getters and related usage for version package * update dependencies * finalize helpers_test User-Agent header value * add integration test for version info injection via vars * tidy go mod and reorganize imports and tidy long lines * inject ldflags variables in build task in Taskfile.yml * replace commands in /travis.yml with tasks properly merging flags * fix install command for go-task to solve "undefined: interp.EnvFromList" error * add coverage files to .gitignore * tidy dependencies in go.mod * update task executable path in tasks due to install path generated by go-task install script * implement exported variable cli.HTTPClientHeader in order to have it available in all cli subpackages and not onli in cli * fix comment replacing "version config" with "global config" * leverage cli.VersionInfo to present a better terminal and json data for version info
per1234
added a commit
that referenced
this pull request
Aug 9, 2021
Sync test assets workflow with templates
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(Following PR #226)
This PR adds to the
DownloadResource.Download()
method the missing configuration setting in order to specify the correctUser-Agent
when contacting Arduino web-services via http/httpsi.e.
User-Agent: arduino-cli/0.3.6-alpha.preview (amd64; linux; go1.10) Commit:deadbeef1010/Build:2019-06-05 23:12:33.1234
in addition, proper testing to check header sent to backend service is provided in
helpers_test.go