Commit Graph

628 Commits

Author SHA1 Message Date
Spencer Gibb
aa160940df import order 2016-10-11 10:25:02 -06:00
Max Ishchenko
c8829f2aa4 Prevent double url encoding for secure ribbon urls (#1389)
Secure ribbon urls were forced to use https scheme via UriComponentsBuilder, that was created from original uri. This transformation url encoded previously encoded url parts that were used to create builder. This was introduced in c883495.

This change fixes double url encoding using RibbonUtils.updateToHttpsIfNeeded that fixes double escaping case and corner case with '+' in url as well.

Fixes gh-1382
2016-10-11 10:19:33 -04:00
Spencer Gibb
f30e8b7b46 Remove @Autowired from FeignClientFactoryBean
@Autowired causes NullPointerExceptions because of some unknown lifecycle issues.

fixes gh-1366
2016-10-06 10:19:46 -06:00
Spencer Gibb
ba3923d706 Fix zuul error when there are colons in request param name.
Previously, parameter names with colons (ie foo:bar), caused an IllegalArgumentException because 41c364002f introduced UriTemplate to properly encode.

fixes gh-1193
2016-10-05 12:51:28 -06:00
Spencer Gibb
622cc83204 polish 2016-10-04 18:48:28 -06:00
bpicode
8e18c3d3b6 Add support for fallback factories in feign client annotation. (#1373)
Adds `@FeignClient.fallbackFactory` to define a `feign.hystrix.FallbackFactory`.

fixes gh-1117
2016-10-04 20:46:33 -04:00
Spencer Gibb
0adbd5662f polish 2016-10-04 18:39:07 -06:00
Mathias Düsterhöft
e109093b83 add config option to not ignore security headers (#1354)
* add config option to not ignore security headers
* fix field documentation of ignoreSecurityHeaders
* add documenation for  zuul.ignoreSecurityHeaders

fixes gh-1096
2016-10-03 23:30:17 -04:00
Jacques-Etienne Beaudet
8e1be54759 Support '+' in encoded query string when rebuilding the URI to https
RibbonUtils now replace the encoded space character '+' in the query string in favor of the equivalent '%20' when rewriting the URI in https. This is due to UriComponentsBuilder verifying the allowed characters in the encoded URI when building to the URI java.net class. The '+' is considered illegal but is widely used in the field. (#1367)
2016-10-03 14:35:30 -04:00
Spencer Gibb
be6f2634b5 Allow OkHttpClient to be customized.
Moved common functionality to AbstractLoadBalancingClient
2016-09-23 14:09:41 -06:00
Spencer Gibb
9eed249028 Allow customization of HttpClient.
Uses ribbon settings to set MaxConnTotal and MaxConnPerRoute. Also allows user to create a custom HttpClient as a constructor argument.

fixes gh-1149
2016-09-22 19:42:20 -06:00
Spencer Gibb
bbff2b24d0 Put Apache Http Client and OkHttpClient in ribbon context.
This eliminates them being created for every zuul request.

Also makes properties consistent accross modules: ribbon.httpclient.*, ribbon.restclient.* and ribbon.okhttp.*

fixes gh-1150
2016-09-22 15:46:53 -06:00
Ryan Baxter
6c9fa68d5a Translate ribbon.ReadTimeout to apache http client socket timeout. Fixes #1357. (#1358) 2016-09-21 14:03:14 -04:00
Dave Syer
f094ecfd88 Allow user to set system properties to control http client in zuul
The SimpleHostRoutingFilter now accepts normal -Dhttps.proxy= and
-Dhttps.port= settings (and other things that generally work with
java.net).

Fixes gh-510
2016-09-20 12:30:49 +01:00
Julien Roy
7ba8063940 Add test on FormBodyWrapperFilter to avoid regressions (#1171) 2016-09-16 14:42:31 -06:00
Spencer Gibb
85eab87dce formatting 2016-09-15 08:34:59 -06:00
rockinrimmer
5ba0cc5860 Check if object is already a ResponseEntity, if so return instead of … (#1343)
* Check if object is already a ResponseEntity, if so return instead of wrapping in another ResponseEnitiy. Which caused headers and status code from original ResponseEnitiy to be lost and for body to be output with whole ResponseEntity instead of just the body

* added test
2016-09-15 10:15:42 -04:00
Spencer Gibb
498e8a1486 Use default maxSemaphore property.
Rather than hard code the default maxSemaphores for zuul use the already defined `zuul.semaphore.maxSemaphores` property.

fixes gh-1332
2016-09-12 09:36:22 -06:00
Spencer Gibb
c7403361fd polish 2016-09-06 08:40:49 -06:00
Sébastien Nussbaumer
d9efb0a84d Allow Content-Length header with values greater than 2 GB (#1320)
fixes gh-1319
2016-09-06 10:38:16 -04:00
Jon Schneider
e556ef84a4 Eliminate dependency on commons-lang in DimensionalServoMetricNaming (#1268) 2016-09-02 22:06:18 -07:00
Jon Schneider
9587003d44 Sanitize Servo metric tag key/value pairs before publishing to Atlas (#1315) 2016-09-01 17:32:30 -04:00
Jon Schneider
8f7ea41fe8 Log partial failure reasons for metrics batches published to Atlas (#1314) 2016-09-01 14:57:52 -04:00
Jon Schneider
b4284d18d5 Escape regex path variables in the uri tag for Spectator (#1311) 2016-09-01 11:27:30 -04:00
Garcia Florian
85a1f3ec20 Removes RibbonCommand suffix.
This is a regression that was originally fixed in 1.1.x

Fixes gh-1308
2016-09-01 09:23:24 -06:00
Spencer Gibb
959b007269 removed duplicate feign ApacheHttpClient configuration 2016-08-31 12:02:25 -06:00
Spencer Gibb
9b550f7293 Support delete with body in zuul where possible.
The apache http client and ok http client support delete with body, ribbon rest client does not.

fixes gh-949
2016-08-31 11:43:05 -06:00
lowzj
d356e57134 update RequestParamParameterProcessor to support map param
fixes gh-1097
2016-08-31 11:04:20 -06:00
Spencer Gibb
6819922d26 Fix MetricsTagProvider for non web apps.
Guard creating and creation of classes that use it with @ConditionalOnClass(name = "javax.servlet.http.HttpServletRequest")

fixes gh-1302
2016-08-29 10:43:17 -06:00
Ryan Baxter
9316124733 Upgrade Hystrix to 1.5.5. Fixes #1289 2016-08-24 16:10:50 -04:00
Spencer Gibb
43adc84dfd Make moving to https urls consistent.
This fixes a case where the ribbon property is set `ribbon.IsSecure=false`, but because the eureka secure port was enabled, the uri created by ribbon was prefixed with https when it shouldn't have.

All places where isSecure is need have been consolidated into RibbonUtils.

fixes gh-1270
2016-08-22 17:16:13 -06:00
Spencer Gibb
8d6aeebb61 Feign URI tests updated to be more inclusive.
Previously with a `@FeignClient(name="http://bad_hostname")` would pass the start time test and fail later in runtime. The test now fails fast.

fixes gh-1257
2016-08-22 15:05:59 -06:00
Ryan Baxter
0bed544188 Merge pull request #1221 from stephlag/zuul_hystrix_threadpool
Make Hystrix Thread Pool available while using Zuul
2016-08-19 12:31:03 -04:00
Stéphane Lagraulet
b98c9ebc1d Add tests to verify old constructors 2016-08-18 14:27:11 +02:00
Dave Syer
cb44cd2e33 Add additional test to look for null hosts in Zuul
Conflicts:
	spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/RibbonClientConfigurationTests.java
2016-08-18 12:59:05 +01:00
Stéphane Lagraulet
f5bb5ff9c1 Keep old constructors to maintain backwards compatibility with spring cloud sleuth 2016-08-18 11:24:15 +02:00
Ryan Baxter
e2e7c490db Merge pull request #1247 from Coramo/master
fix 'RibbonRequest' cannot to encode issues
2016-08-17 13:48:36 -04:00
Dave Syer
7927372b75 Polish 2016-08-17 17:33:02 +01:00
Stéphane Lagraulet
ca2c9018c6 Merge branch 'master' of https://github.com/spring-cloud/spring-cloud-netflix into zuul_hystrix_threadpool 2016-08-17 18:11:52 +02:00
Spencer Gibb
9ed5621a78 Revert "Adds zuul property to customize Hystrix ExecutionIsolationStrategy"
This reverts commit 21df6e43a3.
2016-08-17 09:57:35 -06:00
Dave Syer
b9e2a1b21e Fix test so it actually works if there is a server on localhost:80 2016-08-17 09:19:33 +01:00
Dave Syer
f76f294f7f Rename test to conform to usual pattern 2016-08-17 09:04:37 +01:00
Spencer Gibb
64fff7edd2 Merge branch 'context-path-prefix-support' of https://github.com/kakawait/spring-cloud-netflix into kakawait-context-path-prefix-support 2016-08-16 12:59:10 -06:00
Stefan Fussenegger
d9768b5378 Improved zuul proxy header support.
- add zuul.add-host-header property to add Host header
- add port to X-Forwarded-Host as defined in RFC 7239
- extract PreDecorationFilter.filterOrder() into a public constant

fixes gh-1108
2016-08-16 12:56:54 -06:00
Stéphane Lagraulet
21df6e43a3 Adds zuul property to customize Hystrix ExecutionIsolationStrategy
Add a check to current context as contentLength is already in the context
Get content length from Headers when RibbonCommandContext is built + add tests
Use request content length RibbonRoutingFilter
Add documentation for new zuul.ribbonIsolationStrategy property

fixes gh-339
2016-08-16 10:43:24 -06:00
Coramo
2db2a033ab add 'RibbonRequest' test 2016-08-12 12:02:58 +08:00
Coramo
cf72184883 Merge branch 'master' of https://github.com/spring-cloud/spring-cloud-netflix 2016-08-12 11:00:43 +08:00
Stéphane Lagraulet
62344dccda Merge branch 'master' into zuul_hystrix_threadpool 2016-08-11 09:42:03 +02:00
Stéphane Lagraulet
03caa1b8ce Remove deprecated and unused constructors for RibbonCommandContext and RestClientRibbonCommand 2016-08-11 09:41:15 +02:00
Coramo
97c8f4c026 fix 'RibbonRequest' cannot to encode issues 2016-08-11 11:05:14 +08:00