Commit 0ddad69
authored
core: Clarify missing content-type on HTTP error responses (#12720)
## Summary
In this case, grpc-java preserves the HTTP status-based context, but may
later append `invalid content-type: null`.
That seems misleading when the response is missing `content-type`,
because the header appears to be absent rather than invalid, and the
`null` value exposes a Java implementation detail.
This PR keeps the existing HTTP-to-gRPC status mapping unchanged and
only adjusts the diagnostic for the missing `content-type` case.
## Changes
- keep the existing HTTP-to-gRPC status mapping unchanged
- keep the existing behavior for invalid non-null content-types
unchanged
- replace `invalid content-type: null` with `missing content-type in
response headers`
Ref #124181 parent d92ca44 commit 0ddad69
2 files changed
Lines changed: 23 additions & 2 deletions
File tree
- core/src
- main/java/io/grpc/internal
- test/java/io/grpc/internal
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
227 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
228 | 231 | | |
229 | 232 | | |
230 | 233 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
304 | 322 | | |
305 | 323 | | |
306 | 324 | | |
| |||
0 commit comments