summaryrefslogtreecommitdiff
path: root/lib/chef/http
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #6131 from jamesbroadhead/add_HTTP_PATCHThom May2017-07-241-0/+3
|\ | | | | Add support for HTTP PATCH requests
| * Add support for HTTP PATCH requestsJames Broadhead2017-05-081-0/+3
| | | | | | | | Signed-off-by: James Broadhead <james.broadhead@mongodb.com>
* | Have a sensible default for old chef serverstm/no_api_versionThom May2017-07-051-0/+2
|/ | | | | | | If we don't see a version header, we should default to only supporting API version 0, and if we can't support that, then we should die as usual Signed-off-by: Thom May <thom@chef.io>
* RFC 67: Remove cookbook segmentsThom May2017-04-041-0/+1
| | | | | | | | | This implements RFC 67, which removes cookbook segments, and moves to a single list of all the files contained in a cookbook. This allows us to move forward with better audit modes and also proper shipping of ohai plugins. Signed-off-by: Thom May <thom@chef.io>
* Retry API requests if using an unsupported versiontm/retryable_apiThom May2017-03-292-6/+18
| | | | Signed-off-by: Thom May <thom@chef.io>
* Allow the best API version to be queriedThom May2017-03-281-1/+2
| | | | | | Also tidy up in the face of the real world. Signed-off-by: Thom May <thom@chef.io>
* protect against nil response bodylcg/debug-log-bad-json-payloadLamont Granquist2017-03-021-1/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* truncate long response bodies in debug outputLamont Granquist2017-03-021-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add debug long for non-JSON responseLamont Granquist2017-03-021-1/+2
| | | | | | we should probably raise (?) but this at least helps us debug. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Beginning of automatic API version detectionThom May2017-02-141-0/+50
| | | | | | | | | When we make a request to a chef server, we capture the minimum and maximum support API versions and allow them to be queried. We then provide some infrastructure for making decisions on which class should be used, in a middleware-ish mechanism. Signed-off-by: Thom May <thom@chef.io>
* fix specs: RedundantReturn, RedundantSelf, RedundantBeginLamont Granquist2017-02-131-2/+2
| | | | | | department of redundancy department Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Style/NumericPredicate comparison stylelcg/numericpredicateLamont Granquist2016-12-211-2/+2
| | | | | | | | | | | | | Apparently rubocop thinks the default behavior should be that we have to rewrite every use of `foo == 0` into `foo.zero?` which is a big pile of NOPE for me. After discovering that `.zero?` is actually slower, I'd prefer to go the other direction. Same for `positive?` and `negative?`. These are the only uses of `zero?` in the chef/chef codebase, while I'm pretty sure the inverse rule would touch nearly every file. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/NilComparisonLamont Granquist2016-12-061-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgradeLamont Granquist2016-08-171-2/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* auotfixing Style/SpaceAfterSemicolon copLamont Granquist2016-08-161-1/+1
|
* specs and lazying net-http client buildingLamont Granquist2016-08-111-1/+4
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* make keepalives entirely optionalLamont Granquist2016-08-091-1/+7
| | | | turn on only for the cookbook synchronizer
* use Net::HTTP.startLamont Granquist2016-08-091-1/+1
|
* update to latest chefstyle - fix casecmptm/fix_casecmpThom May2016-04-201-2/+2
|
* Update config specSalim Alam2016-03-211-0/+1
|
* Override no_proxy with internal matcherSalim Alam2016-03-211-1/+6
|
* - Restore previous behavior where we use the user/pass from the URI, if present.nls/proxy-cleanupChris Doherty2016-03-171-3/+11
| | | | - s/ChefConfig::Config.proxy_uri/Chef::Config.proxy_uri/
* Make handling of proxies more consistentNathan L Smith2016-03-171-39/+5
| | | | | | | | | | * Always use `*_proxy` environment variables. * Make a `ChefConfig::Config.proxy_uri` method that gets used by `Chef::Provider::RemoteFile::FTP` and `Chef::HTTP::BasicClient`. * Remove `env` method from `Chef::HTTP::BasicClient` (using `stub_const("ENV", ...)` in specs instead.) * Remove `http_proxy_user` and `http_proxy_pass` methods from `Chef::HTTP::BasicClient` (replaced by functionality in `ChefConfig`.)
* Merge pull request #4707 from chef/lcg/useless-assignmentLamont Granquist2016-03-151-1/+0
|\ | | | | fix some UselessAssignment cases
| * fix some UselessAssignment caseslcg/useless-assignmentLamont Granquist2016-03-141-1/+0
| |
* | manual fixing for raise unlessLamont Granquist2016-03-141-1/+2
| |
* | chefstyle Style/AndOr fixesLamont Granquist2016-03-142-2/+2
|/ | | | | this is part of our informal style guide, lets make it formal since clearly its not getting followed very well.
* s/escape_glob/escape_glob_dir/lcg/fix-escape-globLamont Granquist2016-03-101-1/+1
| | | | | Removes all remaining references to the deprecated escape_glob helper routine.
* Merge pull request #4617 from chef/lcg/chefstyle-perfLamont Granquist2016-03-044-5/+6
|\ | | | | Autofixing new Perf cops in 0.37.2
| * add some @yield docsLamont Granquist2016-03-041-0/+1
| | | | | | | | 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
| |
| * Autofixing new Perf cops in 0.37.2Lamont Granquist2016-02-234-4/+4
| | | | | | | | | | | | | | | | | | | | 6 Performance/Casecmp 18 Performance/Detect 1 Performance/RangeInclude 27 Performance/RedundantBlockCall 6 Performance/RedundantMatch 5 Performance/RedundantMerge 18 Performance/StringReplacement
* | Split the negative check to its own log message.Noah Kantrowitz2016-02-291-1/+6
| |
* | Handle negative content length headers too.Noah Kantrowitz2016-02-291-1/+1
|/ | | This is equivalent to not passing one, we can't check for bad downloads.
* convert MultilineOperationIndentation style to "indented"Lamont Granquist2016-02-121-1/+1
| | | | this looks nicer.
* 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.
* auto fixing some rubocopsLamont Granquist2016-02-093-5/+5
| | | | | | | | | Style/NegatedWhile Style/ParenthesesAroundCondition Style/WhileUntilDo Style/WordArray Performance/ReverseEach Style/ColonMethodCall
* autofixing whitespace copsLamont Granquist2016-02-0512-40/+36
| | | | | | | | | | | | | | | | | | | | | | 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-0213-35/+35
| | | Generated via git ls-files | xargs perl -pi -e "s/(Author.*?<[^@]+@)(?:opscode\\.com|getchef\\.com)(>)/\\1chef.io\\2/gi"
* Replace all Opscode copyrights with Chef Software.Noah Kantrowitz2016-02-0211-11/+11
| | | Created via git ls-files | xargs perl -pi -e "s/(Copyright.*?), Opscode(,)? Inc(\.)?/\\1, Chef Software Inc./gi"
* Copyright year update for 2016 and massive cleanup.Noah Kantrowitz2016-02-0216-17/+17
| | | 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"
* Pass headers to mixlib-authenticationJay Mundrawala2016-01-251-4/+9
|
* Autofixing Style/PercentLiteralDelimeterslcg/percentliteraldelimetersLamont Granquist2016-01-181-1/+1
| | | | | | See chef/chefstyle#11 for analysis and discussion. We select '{}' since audit of our source code shows that is the most common, and that used to be the dominant learning paradigm (e.g. in ruby 1.9 pickaxe book.
* Use double quotes by defaultThom May2016-01-1416-111/+111
| | | | | | | 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.
* really fix copslcg/really-fix-copsLamont Granquist2016-01-121-14/+14
|
* chefstyle: fix Lint/StringConversionInInterpolationLamont Granquist2016-01-121-1/+1
| | | | useless use of `"#{foo.to_s}"`
* Convert all uses of Chef::REST to Chef::ServerAPItm/no_more_restThom May2016-01-112-0/+61
| | | | | | | In the process, stop auto-expanding JSON in the HTTP client, and let individual classes control that themselves. Fixes #2737, Fixes #3518
* Capitalize sentencesTim Smith2015-10-181-2/+2
|
* Update the URL in user agent string12.5.0.current.0danielsdeleo2015-07-161-1/+1
|
* Use version 1 as the default API version if not specified.tylercloke2015-06-051-1/+1
| | | | Default to API v1 and expect that places that were affected by v0 -> v1 changes have properly implemented fallback.