41 Commits

Author SHA1 Message Date
TomPallister
32551624bb wip tests failing 2020-11-27 19:01:27 +00:00
Tom Pallister
3439be8927
Rename all ReRoute to Route to move closer to YARP +semver: breaking 2020-05-23 20:50:05 +01:00
Tom Pallister
fe3e8bd23a
Remove Ocelot specific Middleware to make Ocelot more compatible with kestrel middleware and get ready for YARP 2020-05-23 15:48:51 +01:00
TomPallister
e969e9ff0b unit tests passing 2020-02-18 20:45:28 +00:00
TomPallister
0c5e09d18f moved logic to request mapper and public setter gone 2020-02-09 15:51:22 +00:00
TomPallister
6bd903bc87 tests passing 2020-02-09 15:37:27 +00:00
geffzhang
903b380a5b update .net core 3.0 RTM (#1025)
* feat: update to asp.net core 3.0 preview 9

* fix :  AspDotNetLogger unittest

* feat:  update generic host  and  useMvc

1、Using 'UseMvc' to configure MVC is not supported while using Endpoint Routing https://github.com/aspnet/AspNetCore/issues/9542
2、 use IHost and IHostBuilder

* feat : update .net core 3.0 rc1

* eureka extension

* fixed logger formatter error

* fixed synchronous operations are disallowed of ReadToEnd method

* fix log tests

* Flush method of FakeStream should do nothing

* Update ContentTests.cs

* Fixed ws tests

* feat: delelte comment code

* feat: update .net core 3.0 RTM

* Update OcelotBuilderTests.cs

* Update .travis.yml

mono 6.0.0 and dotnet 3.0.100

* Update Ocelot.IntegrationTests.csproj

update Microsoft.Data.SQLite 3.0.0

* Update .travis.yml

* feat: remove FrameworkReference

1、 remove FrameworkReference
2、 update package

* add appveyor configuration to use version of VS2019 with dotnet core 3 sdk support

* update obsoleted SetCollectionValidator method

* Swap out OpenCover for Coverlet

* Bump Cake to 0.35.0

* Downgrade coveralls.net to 0.7.0
Fix disposing of PollConsul instance

* Remove environment specific path separator

* Do not return ReportGenerator on Mac/Linux

* Remove direct dependency on IInternalConfiguration

* Fix ordering of variable assignment

* Fix broken tests

* Fix acceptance tests for Consul
2019-10-28 07:24:30 +00:00
Thiago Loureiro
5d82e68534
Removed unused usings, removed empty spaces, removed tons os warnings (#903) 2019-05-28 11:00:54 +08:00
Tom Pallister
369fc5b7a4
#555 added some tests for this issue but struggling to replicate (#570)
* #555 added some tests for this issue but struggling to replicate

* #555 removed cmd=instance from service fabric code as someone who knows service fabric says its not needed
I

* #555 renamed test
2018-08-25 12:33:49 +01:00
Tom Pallister
d186f0e1b6
#490 use byte content not stream (#498) 2018-07-25 08:34:58 +01:00
Tom Pallister
23c5fcbf91
#464 (#477)
* #464 added code to request mapper to not automatically add content type and content length headers, .net will automatically try and add these headers in a few circumstances but this solves the 464 issue

* #464 use seek instead of read on body check for websockets tests

* #464 ran out of inodes on linux, looks like reloadonchange causes this
2018-07-20 22:32:40 +01:00
Tom Pallister
e636cefdb1
check which version of .net framework before creating http handler (#412)
* #405 needto check which version of .net we are using but cannot use compiler directives

* #405 started puttig abstraction around static method to get frameworks so we can test this logic

* #405 added test for all methods and tidied up tests

* #405 made contains as ms docs are wrong, thanks to davidni for the heads up
2018-06-20 20:44:38 +01:00
Tom Pallister
463a7bdab4
Feature/websockets (#273)
* #212 - hacked websockets proxy together

* faffing around

* #212 hacking away :(

* #212 websockets proxy middleware working

* #212 map when for webockets working

* #212 some test refactor

* #212 temp commit

* #212 websockets proxy working, tests passing...need to do some tidying and write docs

* #212 more code coverage

* #212 docs for websockets

* #212 updated readme

* #212 tidying up after websockets refactoring

* #212 tidying up after websockets refactoring

* #212 tidying up after websockets refactoring

* stuck a warning in about logging levels into docs!
2018-03-23 18:01:02 +00:00
Simon Jefford
c1b315173f Squash some warnings (#278)
* squash SA1649 warnings (file/type name mismatch)

* squash SA1127 warnings (generic constraint on own line)

* squash SA1507 warnings (multiple blank lines)

* squash package analysis warnings re: summary text

It's not actually possible to provide a summary right now as per
https://github.com/NuGet/Home/issues/4587

* squash missing castle.core reference warning

* squash obsolete method warnings re: AddOcelotBaseUrl
2018-03-16 17:48:11 +00:00
Tom Pallister
5e9ee1f2ed
#263 map all content specific headers to downstream request content property, make sure we dont map them to request specific headers, added a gzip encoding acceptance test (#267) 2018-03-08 07:32:06 +00:00
Philip Wood
c61dc9fd11 Fix brace line spacing and remove multiple concurrent whitespace characters
SA1025, SA1505, SA1508, SA-1509, SA1513
2018-03-03 13:14:24 +00:00
Tom Pallister
d1926268ac
Feature/downstream aggregation (#248)
* started messing around with this on the train last night

* mega hacking away to change middleware into Ocelot iddleware

* scoped data repo back in

* broken commit getting tests working

* another broken commit farting around with tests

* all unit tests passing again

* mw pipeline for ocelot...still loads of hacks but getting there now to get acceptance tests working, then fix config so you can have aggregate and then imlement multiplexer, then mapping to response...loads to do

* all tests passing before aggregation feature implemented

* removed all the request middleware stuff we dont need it

* updated how errors work...tho i think there could be edge case here when aggregating because one downstream could error and this would effect another

* removed multiplexer so you dont have to send route down, this isnt very thread safe...sigh

* hacking around getting the config for aggregates in, this might change

* refactored builder and unit tests passing now

* Updated a bunch of ports for tests

* plugged in code to create reroutes that are aggregates

* made multiplexer a class

* hacked test to death

* simple aggregator done, initial validation done

* removed request id from context, it is still specific for http request

* now aggregates to json always

* docs for aggregate reroutes

* Updated docs
2018-02-27 08:22:47 +00:00
Tom Pallister
98133d9473
Feature/expose http handlers (#224)
* temp commit

* trying to work out how to expose the http handlers in a decent way..

* pissing about at lunch

* changed to func so you can instanciate object or new it up each time

* docs for dele handlers

* upgraded to sdk 2.1.4

* some validation for consul services
2018-02-13 09:07:09 +00:00
geffzhang
ef3c4f614a Monitoring (#219)
* feat:  use Https://github.com/ButterflyAPM to monitor each API request monitoring metrics

* feat: using DiagnosticSource and Butterfly.OpenTracing

* refactor:refactor Ocelot tracing, merge code into OcelotDiagnosticListener

* refactor: move OcelotHttpTracingHandler to Requester

* fix: Requester\HttpClientBuilder.cs(10,14): error CS0234: The type or namespace name 'Tracing' does not exist in the namespace

* feat: add test should_set_up_tracing

* feat : Remove extraneous code

* feat: remove unused DiagnosticSource diagnostic

* fix : test UseTracing

* add test should_call_scoped_data_repository_QosProviderError

* add test should_return_any_errors

* add test HttpClientHttpRequesterTest

*  it should keep it can not be deleted
2018-02-12 18:33:23 +00:00
Tom Pallister
3ac9b3bd87
hacked together load balancing reroutes in fileconfig (#211)
* hacked together load balancing reroutes in fileconfig

* some renaming and refactoring

* more renames

* hacked away the old config json

* test for issue 213

* renamed key

* dont share ports

* oops

* updated docs

* mvoed docs around

* port being used
2018-01-31 20:34:55 +00:00
Tom Pallister
fef19ddf98
Changed routing to support a catch all style (#187)
* Changed routing to support a catch all style

* refactoring placeholder tuff

* implemented simple priority in the routing
2018-01-05 21:26:15 +00:00
Tom Pallister
1d61e403ed changes to create load balancers and qos providers on first request to reroute and then check if they have changed on subsequent requests but not create again if they havent..quite a few breaking changes here. 2017-11-09 17:35:49 +00:00
Oleksandr Yershov
a8b56a63c2 Cookie proxying and auto redirect configuration #128
HttpHandlerOptions are added to ReRoute configuration and passed down to HttpClientHttpRequester as Request properties.
2017-09-28 09:41:13 +03:00
Philip Wood
8042bbab2c Moved common middleare test setup into a base class 2017-07-18 09:28:32 +01:00
Juan Carlos Santana Herrera
24f7b9a171 UpstreamHttpMethod property (of class FileReRoute) changes from string to List<string>. 2017-05-05 11:47:28 +01:00
tom.pallister
be3a2fb6ed Change to fix issue not setting content type header 2017-04-28 13:04:40 +01:00
Philip Wood
80e728aa00 Made changes based on PR comments. Also added lots more tests! 2017-04-19 20:12:08 +01:00
Philip Wood
878eacf1db Remove obsolete code 2017-04-18 15:35:54 +01:00
Philip Wood
a1c6ab4ce4 Get rest of unit tests working 2017-04-18 15:16:27 +01:00
Philip Wood
7c1a277147 Fixed some unit tests 2017-04-18 14:05:15 +01:00
Philip Wood
eeb8f691c7 Very hacky proof of concept 2017-04-17 21:25:04 +01:00
TomPallister
c787202374 I realised we can get rid of the cookie container as cookies are just sent as a header called cookie... 2017-03-05 18:05:20 +00:00
TomPallister
286c7f8488 Fixed issue where qos was being created for each request so circuit breaker was never stopping traffic going to downstream service. 2017-02-11 18:56:36 +00:00
TomPallister
e33fe4cf7d merged develop 2017-02-11 12:07:08 +00:00
geffzhang
caae826d77 Refactor qos as options 2017-02-08 09:25:32 +08:00
Tom Gardham-Pallister
33ce162693 changed upstream http method to use httpmethod class in .net 2017-02-07 18:30:21 +00:00
geffzhang
883be802b3 Refactor CircuitBreaker Pattern
Add Qos Config in ReRoute And Refactor CircuitBreakingDelegatingHandler
2017-02-03 14:49:46 +08:00
TomPallister
af506b079a more logging, more readme, more refactoring 2016-11-05 11:36:58 +00:00
TomPallister
5fc04a0514 started refactoring request builder 2016-10-30 18:35:05 +00:00
TomPallister
56bf4014bd Added request id functionality and general refactoring..also turned out i wasnt returning headers....sigh 2016-10-30 17:29:37 +00:00
TomPallister
f7f4a392f0 implemented adding claims as query strings to downstream route, removed some of the middleware injection optiosn as i have currently have no use case for them, general refactoring to use the OcelotMiddleware a bit more 2016-10-29 19:45:50 +01:00