Open chenfengyuan opened 7 years ago
Unfortunately, it's not as easy as that. CONNECT
comes with it's own set of semantics. We would have to introduce special support to deal with the intricacies of CONNECT
semantics (e.g. does a CONNECT request have a request body? I'd say no, but still it needs to receive data later on. Similarly for the reponse).
I'd say it's mostly out of scope to add this functionality here. I guess it could be simple enough to reuse lots of the internals to build both an HTTP and an HTTPS server but akka-http itself might not be the right place.
Yes, you are right. As akka-http does not expose most of the internals, I will try to use and modify akka-http source directly.
@chenfengyuan did you get anywhere with this?
@kbrowder no
In #1316, akka-http would gracefully reject
CONNECT
request. If an option that acceptsCONNECT
is added, users can easily useHttp().serverLayer
to implement their http proxy.