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.

Graal: remove reflective header parsers

See original GitHub issue

Based on @noelwelsh’s fine work, this commit shows a problem with modeled headers:

$ curl http://localhost:8080/raw
Some(Accept: */*)
$ curl http://localhost:8080/model
None

It works on the JVM:

$ curl http://localhost:8080/raw
Some(Accept: */*)
$ curl http://localhost:8080/model
Some(Accept: */*)

This is almost certainly a result of bootstrapping the header parsers with runtime reflection. It’s been a hidden implementation detail for years, but fails in the world beyond the JVM.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jopricecommented, Apr 3, 2020

I spoke too soon. I have a completely different issue that looked similar to this one: An Authorization header with a single token, that is, not containing the “type” specifier. The compliant parser of http4s doesn’t let that one slide. Please excuse the noise!

0reactions
rossabakercommented, Apr 3, 2020

This is a common pitfall. Maybe we should consider a version that returns either the raw header or the modeled header so things don’t just “disappear” like this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove reflection from HttpHeaderParser #1484 - GitHub
HttpHeaderParser uses reflection and subclassing. I'd rather remove reflection and compose parser implementations. That would require traits ...
Read more >
Working with Native Image efficiently | graalvm - Medium
This article looks at common issues and misunderstandings when using native image and what problems are caused by a missing or incomplete ...
Read more >
Fix GraalVM Native Image Build Issues - Simply-How.com
1. Introduction 2. Getting started 3. Build-time errors
Read more >
Substrate VM Project - Oracle Help Center
Install glibc-devel , zlib-devel (header files for the C library and zlib ) ... Most of the commands are inherited from the Graal...
Read more >
19.3.6 - GraalVM
GraalVM Community Edition 19.3.6 is a Critical Patch Update (CPU) release. It is based on OpenJDK CPU and includes all the OpenJDK security...
Read more >

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