Commit Graph

108 Commits

Author SHA1 Message Date
Devon Carew 4e35b1689d
update deps; simplify analysis options (#790)
* update deps; simplify analysis options

* update package version

* require dart 3.8; upgrade other deps

* dartfmt

---------

Co-authored-by: Moritz <mosum@google.com>
2025-06-20 17:27:49 +02:00
Slava Egorov a6b94850a1
Fix CallOptions.mergeWith (#786)
It should have symmetric behavior.

Given `WebCallOptions a` and `CallOptions b` both `a.mergeWith(b)` and `b.mergeFrom(a)`
should return WebCallOptions.
2025-05-26 13:11:00 +02:00
Thomas Hareau d297a29cb7
Add server interceptor acting as a middleware (#762)
* Add server interceptor acting as a middleware

* Remove unused import

* Add changelog entry

* Inline variable

* Bump version

* Fix infinite recursion
2025-05-23 09:01:42 +02:00
Aran Donohue ebc838b66d
fix: update grpc_web_server.dart envoy config to support newer envoy version (#760)
Co-authored-by: Moritz <mosum@google.com>
2025-02-21 14:18:14 +01:00
Aran Donohue 840661415d
Fix: Migrate off legacy JS/HTML APIs (#750)
* update: Migrate off legacy JS/HTML apis

* update: use dart.library.js_interop in place of dart.library.html

* update: dart format xhr_transport.dart and update dart sdk to v3.4.0 in workflows

* update: use if instead of switch case in xhr_transport.dart

* update: upgrade web package to v1.1.0

* refactor: use Uint8List for sending data over XHR rather than Int8List

* refactor: eta-reduction of call to request.setRequestHeader

* Update client_xhr_transport_test to avoid dart:html, updating xhr_transport to support testability

* fixup tests

---------

Co-authored-by: minoic <minoic2020@gmail.com>
Co-authored-by: Moritz <mosum@google.com>
2025-02-18 10:13:50 +01:00
Devon Carew 7f9042f79e
various analysis updates (#755)
* various analysis updates

* misc updates

* remove unintentional dartdoc comment

* Update CONTRIBUTING.md

Co-authored-by: Moritz <moritz@suemmermann.de>

* add ignore comments for use of deprecated apis

---------

Co-authored-by: Moritz <moritz@suemmermann.de>
2025-01-30 08:41:34 +01:00
steffenhaak 071ebc5f31
fix: keep alive timeout finishes transport instead of connection shutdown (#722)
* fix: keep alive timeout finishes transport instead of shutting down channel

* Update keepalive_test.dart

* Update CHANGELOG.md

---------

Co-authored-by: Moritz <mosum@google.com>
2024-09-06 17:13:11 +02:00
Moritz 81776333d9
Small fixes (#732)
* Small fixes

* Revert changes on file

* Add changelog

* Small fixes in keepalive test

* Add delay

* Fix symbol visibilty

* Add try catch for debugging

* Fail

* fail

* Use for loop
2024-09-06 15:09:54 +02:00
c-lucera-pvotal 4f6fe9b111
fix: fix headers not completing when call is terminated (#728)
Fixes #727
2024-08-28 08:18:15 +02:00
Kevin Moore 52023d404e code fixes 2024-05-30 00:27:50 +00:00
Moritz 9f65399e28
Move `codec.dart` to former place (#713) 2024-05-17 14:53:33 +02:00
Moritz 0d02e4386f
Remove dependency on `package:archive` (#707)
* Remove dependency on package:archive

* Test compression on vm only

* Add licenses

* Fix analyze issues

* Fix codec web

* Fix licenses

* Add changelog
2024-05-06 15:25:06 +02:00
Ruben Garcia bdbe5f5003
Fix issue 669 (#693)
* Fix issue 669

* Update CHANGELOG.md

* Update CHANGELOG.md

* Fix dart format issue.
Fix prefer single quote issue.

* Update pubspec and changelog to avoid merge check
publish / validate
validate packages

* Add test for GRPC Compression Flag

* Fix dart analyze issues.

* Fix latest dart analyze issue (uninizialized variable)
2024-04-22 16:09:18 +02:00
dependabot[bot] b7f9115b98
Bump lints from 2.1.1 to 3.0.0 (#675) 2023-10-23 08:44:11 +00:00
Moritz cba40da0d8
Fix imports in `http2_connection.dart` (#662)
* Fix imports in `http2_connection.dart`

* Export `Proxy`

* dart fix

* Add documentation comment

* Add licenses
2023-08-24 11:50:01 +02:00
Moritz 3f05c37367
Remove canceled streams (#661)
* Remove canceled streams

* Inline variabel

* Add changelog

* Add test

* Add description to test

* More messages for less flakiness
2023-08-24 10:42:21 +02:00
Moritz 4ccd8a0e3d
Add proxy functionality (#657)
* Add proxy to options

* Add proxy connect

* Works now

* Uncomment proxy line

* Revert change

* Doesn't work

* Works

* Fix bug

* Add secure test

* Refine test

* Add changelog

* Changes as per review
2023-08-23 10:07:15 +02:00
Kevin Moore a6322db468
Regenerate protobuf types with new protobuf version (#658) 2023-08-16 05:33:31 -07:00
Moritz c7e07a09a5
Fix interop tests (#651)
* Fix interop tests

* Keepalive cleanups

* Prepare for publish
2023-07-13 12:05:59 +02:00
Moritz b7df4c8290
Deflake keepalive tests (#645)
* Deflake keepalive tests

* Add timer

* Increase wait timer

* Only send ping on open connection

* Switch server keepalive to fakeasync

* Tiny refactor

* Add changelog entry
2023-06-22 10:30:53 -04:00
Moritz 03f07e9535
Keepalive (#634)
* Keepalive tests run!

* Renaming

* Some refactorings

* Find a place where to handle the keepalive manager

* Fix bug

* Make KeepAliveManager independent of transport

* Fix call sites in client

* Add server keepalive handler

* Wire through onDataReceived

* Add ServerKeepAliveManager test

* Refactorings

* Tests kind of run now

* Add shutdown test

* Remove unneeded override

* Remove unneeded mocks

* Send correct error codes and cleanup

* Small changes

* Rename

* Add documentation

* Add test for !_enforcesMaxBadPings

* Refactor tests

* Switch to http2 master branch

* Renaming

* Null shutdownTimer

* Refactor to event-state model

* Smaller refactorings

* Works now

* Switch tests to isA

* Shifting things around

* Split into server and client

* Format

* rename

* Tweaks

* Switch order of optional parameters to make change non-breaking

* Add some leeway to the durations in tests

* Make keepalive tests vm only

* Switch back to onEvent in state

* Switch to published http2
2023-06-21 11:14:43 -04:00
Moritz f420b77a22
Switch to Dart 3 (#633)
* Switch to Dart 3

* Trying to get the new version to run

* Fix test

* Switch CI to Dart 3

* Adapt CI

* Do not run vmservice on chrome

* Typo

* Add skip to not fail on `dart test`

* Add changelog entry

* Changes as per review
2023-06-07 10:24:33 +02:00
Ben Getsug d0e3a4c706
Expose client IP address to server (#590) 2022-12-13 09:12:28 +01:00
MattyBoy 60311a7492
Added ability to set connectTimeout of socket (#575) 2022-12-12 09:54:23 +01:00
Ben Getsug 6c0829ed8b
Custom Error Handling for Server (#588)
Closes https://github.com/grpc/grpc-dart/issues/51
2022-12-01 11:29:57 +01:00
Kevin Moore dbf5421eb6
Cleanup: update to and use latest pkg:lints with associated fixes (#587)
Bump min Dart SDK for grpc to 2.17
Regenerate all code
Fix generate scripts
Add dependabot
2022-10-31 11:47:31 -07:00
Vyacheslav Egorov 27a235976a
Change default authority for UDS connections. (#577)
We were using path to the UDS socket itself, which is incorrect `:authority` value. 

This was tripping checks in some HTTP2 protocol implementations.

Instead default `:authority` to `localhost`, which in line with other gRPC implementations.

Fixes #576
2022-09-08 14:41:34 +02:00
Rui Craveiro b8f872a3dc
Send trailers included on GrpcError object (#538) 2022-08-23 12:40:03 +02:00
Cobinja af965f15f7
Expose onConnectionStateChanged for channels (#565)
Co-authored-by: Vyacheslav Egorov <vegorov@google.com>
2022-08-15 15:03:51 +02:00
Alexander Aprelev 94b71a3e1c
Ensure server's security context is used for the server. (#547) 2022-04-27 13:03:08 +02:00
Kevin Moore 151fa904b4
Remove unnecessary imports and superfluous type checks (#525) 2021-10-05 08:39:00 -07:00
Kenneth Gulbrandsøy acd2e93a25
Add custom trailers to GrpcError (#493) 2021-08-10 11:53:09 +02:00
Bálint Böde f5508d9801
Fix a typo on the inner invoker parameters (#492) 2021-06-29 23:56:12 +02:00
Piotr Morgwai Kotarbinski d4504dacf1
GrpcOrGrpcWeb: provide more flexible constructors (#484) (#485) 2021-06-08 11:14:57 +02:00
Piotr Morgwai Kotarbinski 7c8fca7195
GrpcOrGrpcWeb: remove checking if ports are different (#482) (#483)
* GrpcOrGrpcWeb: remove checking if ports are different (#482)

Using the same port is a standard for AspNetCore gRPC server.

* improve source docs
2021-06-03 12:56:02 +02:00
Piotr Morgwai Kotarbinski e88b84a993
Add GrpcOrGrpcWebClientChannel (#457) (#479) 2021-06-02 12:25:23 +02:00
EPNW b272632450
Make clientCertificate available in ServiceCall (#472)
Co-authored-by: Vyacheslav Egorov <vegorov@google.com>
2021-05-11 13:35:36 +02:00
Vyacheslav Egorov 2f5ef8c663
Fix directives_ordering lint (#473) 2021-05-03 17:00:44 +02:00
Daniel Brauner 6c16fceb2a
Be more resilient to broken deployments (#460)
Require 200 HTTP status and a supported Content-Type
header to be present in a response.

When handling malformed responses make effort
to translate HTTP statuses into gRPC statuses as
gRPC protocol specification recommends.

Fixes #421
Fixes #458 

Co-authored-by: Vyacheslav Egorov <vegorov@google.com>
2021-03-22 17:22:32 +01:00
Sam Rawlins 7e8952c352
Bump mockito to breaking change with fixes (#450) 2021-02-04 09:42:29 +01:00
Kevin Moore 32fbc03c63
Enable and fix pedantic v1.9 lints (#445)
Co-authored-by: Vyacheslav Egorov <vegorov@google.com>
2021-02-01 09:12:26 +01:00
Ivan Inozemtsev 1e1831a187
Migrate grpc to null safety (#432) 2021-01-29 12:40:52 +01:00
Ji Li 2584a5e536
Add XHR raw response to the GrpcError for a better debugging (#423)
Co-authored-by: Vyacheslav Egorov <vegorov@google.com>
2021-01-28 12:33:41 +01:00
Vyacheslav Egorov fbcb426f21
Make sure that grpc_web.dart builds on the Web (#427)
c48af63 accidentally introduced a dependency on VM specific libraries in the shared code

Fix envoy configuration to make sure grpcweb tests runs
2021-01-22 15:35:21 +01:00
Luis Alejandro Herrera León 93c21feb56
Prevent an exception to be thrown when a web connection stream is closed (#414) 2020-12-20 23:05:59 +01:00
Vyacheslav Egorov ed960c26c6
Avoid deprecated List() constructor. (#415)
Enable prefer_collection_literals lint.
2020-12-17 10:50:45 +01:00
Ankur Jain c48af638a5
Support message compression (#409)
* Added support for compression/decompression, which can be configured through 
  `ChannelOptions` constructor's `codecRegistry` parameter or adding the 
  `grpc-accept-encoding` to `metadata` parameter of `CallOptions` on the client 
  side and `codecRegistry` parameter to `Server` on the server side.
  Outgoing rpc can be compressed using the `compression` parameter on the 
  `CallOptions`.

Closes #6
2020-12-11 09:52:24 +01:00
Isaac Saldana 275cc544c9
Fix concurrent modification error in GrpcWebClientChannel.terminate
Fixes #331

Co-authored-by: Vyacheslav Egorov <vegorov@google.com>
2020-11-12 12:52:04 +01:00
Vyacheslav Egorov f1c475603f
Cleanups (#398)
* Regenerate protobuf files using newest protoc plugin
* Fix lints everywhere
* Remove visibleForTesting from profile.dart
2020-11-12 11:36:59 +01:00
Vyacheslav Egorov e634f9749f
Fix for duplicate headers (#397) 2020-11-12 09:51:57 +01:00