Support full HTTP/2 specification - PRI
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 58
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 6
Description
It seems the HTTP/2 implementation in Thruster is only partially completed. That, or I don't understand enough about it yet, which is entirely possible.
I am seeing this in the logs when trying to make an HTTP/2 connection:
```
{"time":"2025-03-20T21:12:22.988853435Z","level":"INFO","msg":"Request","path":"*","status":501,"dur":0,"method":"PRI","req_content_length":-1,"req_content_type":"","resp_content_length":27,"resp_content_type":"","remote_addr":"10.31.32.141:57578","user_agent":"","cache":"bypass","query":""}
Unsupported HTTP method used: PRI
```
A little research tells me that `PRI` is part of the spec, and that others have run into implementation issues like this too:
See: https://stackoverflow.com/questions/50434269/pri-method-in-http2-implementation-causing-issue
I ran into this by setting an AWS Application Load Balancer (ALB), which is doing TLS termination, to talk to my Rails app using HTTP/2 instead of HTTP/1. Here is the target group config

The workaround is to use HTTP/1 only, but that is somewhat defeating the purpose of Thruster.
So I think (and please correct me if I am wrong) Thruster needs to be updated to accept the `PRI` method, and then subsequently ignore it.
Contributor guide
Research direction
No source file or test is named in the issue. Start by tracing Thruster's HTTP request handling for the HTTP/2 connection path and reproduce the AWS ALB-to-Rails case; done means PRI no longer produces the shown 501 response and the connection proceeds as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, go, rails
- Domain
- backend, cloud, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100