question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

THttpService.validateRequestAndDetermineSerializationFormat on MediaType.parse(accept) failure behavior

See original GitHub issue

@trustin

The following code will end with HTTP 406 for accept header such as text/plan, */*; q=0.5.

https://github.com/line/armeria/blob/master/thrift/src/main/java/com/linecorp/armeria/server/thrift/THttpService.java#L465

I have two concerns.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
anuraagacommented, Mar 13, 2017

While thinking about HTTP encoding, I remembered this code that I copied as is from Netty

https://github.com/line/armeria/blob/master/core/src/main/java/com/linecorp/armeria/server/http/encoding/HttpEncoders.java#L60

If we have a generic Accept header parsing mechanism, we should probably replace it too 😃

0reactions
trustincommented, Mar 15, 2017

If we have a generic Accept header parsing mechanism, we should probably replace it too 😃

We currently rely on MediaType.parse() on this, so it can’t be used for accept-encoding or accept-language, but I’d love to see this happen someday…

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found