aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/filetransfer.cc
AgeCommit message (Collapse)Author
2020-10-06Remove static variable name clashesEelco Dolstra
This was useful for an experiment with building Nix as a single compilation unit. It's not very useful otherwise but also doesn't hurt...
2020-09-25Merge remote-tracking branch 'origin/master' into github-api-tokenGregory Hale
2020-09-21Move Callback into its own headerEelco Dolstra
This gets rid of the inclusion of <future> in util.hh, cutting compilation time by ~20s (CPU time). Issue #4045.
2020-09-16Fetch commits from github/gitlab using Auth headerGreg Hale
`nix flake info` calls the github 'commits' API, which requires authorization when the repository is private. Currently this request fails with a 404. This commit adds an authorization header when calling the 'commits' API. It also changes the way that the 'tarball' API authenticates, moving the user's token from a query parameter into the Authorization header. The query parameter method is recently deprecated and will be disallowed in November 2020. Using them today triggers a warning email.
2020-07-20Use heuristics to decide when to show the responseCarlo Nucera
Due to https://github.com/NixOS/nix/issues/3841 we don't know how print different messages for different verbosity levels.
2020-07-16Merge branch 'master' of github.com:NixOS/nix into add-body-to-network-errorsCarlo Nucera
2020-07-15Merge branch 'master' of github.com:NixOS/nix into add-body-to-network-errorsCarlo Nucera
2020-06-26Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-18Fix bugsJohn Ericson
- Bad dynamic cast target ...classic - std::shared_ptr need explicit deref
2020-06-18Merge remote-tracking branch 'obsidian/fix-url-format' into ↵John Ericson
add-body-to-network-errors
2020-06-18Prevent '%' in URL from causing crashesJohn Ericson
We have a larger problem that passsing computed strings to the first variable argument of many exception constructors is unsafe because that first variable argument is interpreted not as a plain string, but format string, and if it contains '%' boost::format will abort, since there are no arguments to the format string. In this particular instance '%' was used as part of an escape code in a URL, which, when the download failed, caused Nix to abort displaying the `FileTransferError`.
2020-06-18Adjust FileTransferError message to use opt responseJohn Ericson
2020-06-17Add HTTP responses to FileTransferErrorsCarlo Nucera
2020-06-17Replace `TransferItem::status` with a local variableCarlo Nucera
Everywhere seems to use `getHTTPStatus` now.
2020-06-17Include review commentsCarlo Nucera
2020-06-17Make successful states coherentCarlo Nucera
The successful states used in these two places in the code were slightly different. Should they be the same list?
2020-06-17Fix coverage buildEelco Dolstra
2020-06-17Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-16Fix FTP supportEelco Dolstra
Fixes #3618.
2020-06-15Remove trailing whitespaceEelco Dolstra
2020-06-09Show HTTP status messageEelco Dolstra
For example: warning: unable to download 'https://api.github.com/repos/edolstra/dwarffs/commits/master': HTTP error 403 ('rate limit exceeded'); using cached version
2020-06-09FileTransfer: Don't store status since curl already does thatEelco Dolstra
2020-06-02elide the 'ErrorInfo' in logError and logWarning callsBen Burdette
2020-05-13consistent capitalizationBen Burdette
2020-05-11Merge branch 'master' into errors-phase-2Ben Burdette
2020-04-08datatransfer.{cc,hh} -> filetransfer.{cc,hh}Nikola Knezevic