summaryrefslogtreecommitdiff
path: root/lib/chef/http.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix a few bad copyrightsTim Smith2016-10-201-1/+1
| | | | | | I think this happened when we merged the Opscode and Chef copyrights Signed-off-by: Tim Smith <tsmith@chef.io>
* Rebuild HTTP headers on each retried requestShane da Silva2016-10-151-3/+2
| | | | | | | | | | | | | | Depending on how you configure your Chef client, it's possible that a later retry would have an authentication timestamp header (`X-OPS-TIMESTAMP`) that was more than 900 seconds old. Since the Chef server treats timestamps older than this threshold as unauthorized requests, you would potentially get seemingly spurious "401 Unauthorized" responses from the server. A solution is to generate the headers on each retry so that we have a new authentication timestamp for each retried request. Signed-off-by: Shane da Silva <shane@dasilva.io>
* rearrange private/public add @api privateLamont Granquist2016-08-181-11/+25
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add an @api private commentLamont Granquist2016-08-181-0/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* stray Lint/UselessAccessModifierlcg/more-more-copsLamont Granquist2016-08-171-2/+0
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgradeLamont Granquist2016-08-171-2/+0
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Update to latest chefstyleJohn Keiser2016-08-171-2/+0
|
* test Chef::HTTP and tweak cacheLamont Granquist2016-08-111-2/+6
| | | | | | this is mildly awful, but works around the String-vs-URI crap Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* cache correctlyLamont Granquist2016-08-091-3/+2
|
* make keepalives entirely optionalLamont Granquist2016-08-091-21/+32
| | | | turn on only for the cookbook synchronizer
* per-host/port cache of BasicClientLamont Granquist2016-08-091-1/+5
|
* memoize the BasicClientLamont Granquist2016-08-091-13/+16
|
* Remove deprecated Thread.exclusive around require call.Marin Jankovski2016-06-291-5/+5
|
* Merge pull request #4658 from chef/tm/remote_file_download_progress11.9Thom May2016-03-151-1/+31
|\ | | | | Remote file download progress
| * Enable progress output to be configuredtm/remote_file_download_progressThom May2016-03-041-6/+2
| | | | | | | | Add tests around progress output and tidy up
| * Merge branch 'remote-file-download-progress' of ↵Thom May2016-03-031-1/+35
| |\ | | | | | | | | | https://github.com/brandocorp/chef into tm/remote_file_download_progress
| | * fix broken specsBrandon Raabe2015-03-211-1/+1
| | |
| | * new doc formatter event, remove progress barBrandon Raabe2015-03-201-77/+32
| | |
| | * pass resource as an option to allow access to resource eventsBrandon Raabe2015-03-181-8/+20
| | |
| | * add progress interval, add ProgressBar classBrandon Raabe2015-03-151-2/+64
| | |
| | * read content length from the response and use to show overall statusBrandon Raabe2015-03-151-1/+4
| | |
* | | chefstyle Style/AndOr fixesLamont Granquist2016-03-141-1/+1
| | | | | | | | | | | | | | | this is part of our informal style guide, lets make it formal since clearly its not getting followed very well.
* | | add some @yield docsLamont Granquist2016-03-041-0/+3
| | | | | | | | | | | | added some FIXMEs because trying to sort out types for random undocumented code was making me completely aggro
* | | remove unused block argumentslcg/chefstyle-perfLamont Granquist2016-02-231-1/+1
|/ /
* | Make sure that we have a valid object before calling close!drag00n2016-02-161-1/+1
| | | | | | | | | | | | This fixes [#2171](https://github.com/opscode/chef/issues/2171) when a tempfile cannot be created or proper filesystem permissions do not exist. This allows the proper exception to be thrown.
* | pull rubocop 0.37.2 into chefstyleLamont Granquist2016-02-121-1/+1
| | | | | | | | | | this is from the same ruleset that we had, but the new code catches more conditions.
* | autofixing whitespace copsLamont Granquist2016-02-051-16/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
* | Update all auth email address from opscode.com and getchef.com to chef.io.Noah Kantrowitz2016-02-021-5/+5
| | | | | | Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/gi"
* | Copyright year update for 2016 and massive cleanup.Noah Kantrowitz2016-02-021-1/+1
| | | | | | Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g"
* | Use double quotes by defaultThom May2016-01-141-12/+12
| | | | | | | | | | | | | | This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
* | chefstyle: fix Lint/StringConversionInInterpolationLamont Granquist2016-01-121-1/+1
| | | | | | | | useless use of `"#{foo.to_s}"`
* | expose HTTP optionstm/fix_reg_tests_2Thom May2015-12-091-0/+2
| | | | | | | | and use it in registration client specs
* | Merge pull request #4130 from chef/lcg/lazy-socketless-requireLamont Granquist2015-11-041-2/+9
|\ \ | | | | | | lazy the socketless require in Chef::HTTP
| * | thread-safe performant lazy requirelcg/lazy-socketless-requireLamont Granquist2015-11-041-1/+5
| | |
| * | add more verbose info/clarity to comment blockLamont Granquist2015-11-041-2/+3
| | |
| * | lazy the socketless require in Chef::HTTPLamont Granquist2015-11-041-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | if this is always required then everything that uses Chef::HTTP will load up chef-zero which will load up Webrick, which does DNS lookups of the current host which causes a DNS lookup and possible timeout. it also likely isn't doing pretty things to chef-client memory usage and load times there as well.
* | | Add connection resets to HTTP retry casesdanielsdeleo2015-11-041-1/+1
| | |
* | | Skip retries of certificate verification failuresdanielsdeleo2015-11-041-1/+1
| | |
* | | Re-raise SSL errors after retry w/ correct classdanielsdeleo2015-11-041-2/+2
| | |
* | | Add in retry for possible transient SSL errorsglasschef2015-11-041-0/+7
|/ /
* | Add --no-listen option to disable zero binding to portdanielsdeleo2015-04-011-0/+1
| |
* | Extract Chef Zero code out to chef zero, re-enable socket listeningdanielsdeleo2015-04-011-1/+1
| |
* | Hoist socketless chef-zero support into Chef::HTTPdanielsdeleo2015-04-011-2/+11
|/ | | | | | Was hoping to avoid this, but there are multiple subclasses of Chef::HTTP that interact with the server, which all must support socketless mode.
* Fix. Make sure that scheme part of the URI is treated in a case-insensitive ↵Krzysztof Wilczynski2014-12-291-1/+1
| | | | | | | | | | manner. This is as per http://en.wikipedia.org/wiki/URI_scheme, and solves some edges i.e., following (30x) URL from the "Location" header where we have to deal with "HTTP://". Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
* Remove 1.8 and 1.9 specific monkey patchesdanielsdeleo2014-11-261-1/+0
|
* Merge pull request #1827 from svanharmelen/fix-redirect-bugSerdar Sutay2014-10-101-1/+1
|\ | | | | Fix a bug when receiving a relative redirect location
| * Updated the code after discussing with @btm, @lamont-granquist and ↵Sander van Harmelen2014-09-091-4/+1
| | | | | | | | @danielsdeleo
| * Fix a bug when receiving a relative redirect locationSander van Harmelen2014-08-191-0/+3
| | | | | | | | | | | | Currently when you use a provider that somewhere along the line uses Chef::HTTP.request or Chef::HTTP.streaming_request, you will receive an error when the response is a redirect with a relative location.
* | read http_retry_count from chef config in the spec; add HTTP error code in ↵Hui Hu2014-09-041-1/+1
| | | | | | | | the log.
* | retry on HTTP 50X Error when calling Chef REST APIHui Hu2014-08-251-12/+19
| |