Skip to content

Commit

Permalink
fix exception in parse metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
kernel0x committed Dec 22, 2023
1 parent 76d8dcf commit c0d906d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 21 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ Pick a UI implementation and add the dependency:

````java
dependencies {
debugImplementation 'com.github.kernel0x.finch:ui-drawer:2.2.1'
releaseImplementation 'com.github.kernel0x.finch:noop:2.2.1'
debugImplementation 'com.github.kernel0x.finch:ui-drawer:2.2.3'
releaseImplementation 'com.github.kernel0x.finch:noop:2.2.3'
// optional only for OkHttp
debugImplementation 'com.github.kernel0x.finch:log-okhttp:2.2.1'
releaseImplementation 'com.github.kernel0x.finch:log-okhttp-noop:2.2.1'
debugImplementation 'com.github.kernel0x.finch:log-okhttp:2.2.3'
releaseImplementation 'com.github.kernel0x.finch:log-okhttp-noop:2.2.3'
// optional only for GRPC
debugImplementation 'com.github.kernel0x.finch:log-grpc:2.2.1'
releaseImplementation 'com.github.kernel0x.finch:log-grpc-noop:2.2.1'
debugImplementation 'com.github.kernel0x.finch:log-grpc:2.2.3'
releaseImplementation 'com.github.kernel0x.finch:log-grpc-noop:2.2.3'
// optional only for logs
debugImplementation 'com.github.kernel0x.finch:log:2.2.1'
releaseImplementation 'com.github.kernel0x.finch:log-noop:2.2.1'
debugImplementation 'com.github.kernel0x.finch:log:2.2.3'
releaseImplementation 'com.github.kernel0x.finch:log-noop:2.2.3'
}
````

Expand Down
4 changes: 2 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ext.versions = [
minSdk : 21,
targetSdk : 34,
compileSdk : 34,
libraryVersion : '2.2.2',
libraryVersionCode: 9,
libraryVersion : '2.2.3',
libraryVersionCode: 10,

okhttp3 : '3.7.0',
gson : '2.8.2',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,14 @@ internal class FinchClientInterceptor : ClientInterceptor {
private fun toHttpHeaderList(headers: Metadata): List<HeaderHttpModel> {
val httpHeaders = ArrayList<HeaderHttpModel>()
headers.keys().forEach { key ->
httpHeaders.add(
HeaderHttpModel(
key,
headers.get(Metadata.Key.of(key, Metadata.ASCII_STRING_MARSHALLER)) ?: ""
if (!key.endsWith(Metadata.BINARY_HEADER_SUFFIX)) {
httpHeaders.add(
HeaderHttpModel(
key,
headers.get(Metadata.Key.of(key, Metadata.ASCII_STRING_MARSHALLER)) ?: ""
)
)
)
}
}
return httpHeaders
}
Expand Down
12 changes: 6 additions & 6 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ android {
}

dependencies {
//debugImplementation 'com.github.kernel0x.finch:ui-drawer:2.0.2'
//releaseImplementation 'com.github.kernel0x.finch:noop:2.0.2'
//debugImplementation 'com.github.kernel0x.finch:log-okhttp:2.0.2'
//releaseImplementation 'com.github.kernel0x.finch:log-okhttp-noop:2.0.2'
//debugImplementation 'com.github.kernel0x.finch:log:2.0.2'
//releaseImplementation 'com.github.kernel0x.finch:log-noop:2.0.2'
//debugImplementation 'com.github.kernel0x.finch:ui-drawer:2.2.3'
//releaseImplementation 'com.github.kernel0x.finch:noop:2.2.3'
//debugImplementation 'com.github.kernel0x.finch:log-okhttp:2.2.3'
//releaseImplementation 'com.github.kernel0x.finch:log-okhttp-noop:2.2.3'
//debugImplementation 'com.github.kernel0x.finch:log:2.2.3'
//releaseImplementation 'com.github.kernel0x.finch:log-noop:2.2.3'
debugImplementation project(":ui-drawer")
debugImplementation project(":log")
debugImplementation project(":log-okhttp")
Expand Down

0 comments on commit c0d906d

Please sign in to comment.