-
Hi, we are trying to proxy NTRIP connections through YARP. NTRIP is a (20 year old) protocol based on HTTP to transmit RTCM data (positioning data) in a streaming fashion. Unfortunately the people designing the protocol back than derivated a little bit from the HTTP specs at some point which now gives me a few headaches when trying to proxy these streams over YARP. This article here gives a good overview of the differences by describing the changes from rev1 to rev2 of the NTRIP protocol (where they tried to stay with the HTTP spec in rev2): To get a little bit more concrete on what they changed, the biggest problem is, that the response starts with something like this Unfortunately the parsing in the HttpClient library is very strict and throws when these lines do not exactly match the HTTP spec. I guess my question is: Does anyone see any chance on how to get this working? I was looking at using (I would have loved to just override the HttpClient's parsing implementation, but thats all just private internal code). Thanks for your thoughts! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
It's unlikely. HTTP is complicated enough without trying to bend it into other protocols. Abstracting and exposing the internal parser would give up a lot of flexibility and performance. Plugging in an alternative HTTP stack would be more viable. @MihaZupan, do you have that LLHTTP prototype available? |
Beta Was this translation helpful? Give feedback.
-
I am not familiar with this protocol, but is the main difference between it and HTTP the modified status line (e.g. I see some mentions online that v1 of the protocol uses only |
Beta Was this translation helpful? Give feedback.
I am not familiar with this protocol, but is the main difference between it and HTTP the modified status line (e.g.
ICY
instead ofHTTP
) in the server response?I see some mentions online that v1 of the protocol uses only
Content-Length
. If so, it should be relatively straightforward to overwrite just that part in a custom stream (SocketsHttpHandler.PlaintextStreamFilter
would be the appropriate place to plug that in).