TUN-7158: Correct TCP tracing propagation
Previously QUIC would send TCP tracing response header that was empty regardless if prompted from origintunneld.
This commit is contained in:
parent
8a9f076a26
commit
bd046677e5
|
@ -383,12 +383,16 @@ type streamReadWriteAcker struct {
|
||||||
|
|
||||||
// AckConnection acks response back to the proxy.
|
// AckConnection acks response back to the proxy.
|
||||||
func (s *streamReadWriteAcker) AckConnection(tracePropagation string) error {
|
func (s *streamReadWriteAcker) AckConnection(tracePropagation string) error {
|
||||||
metadata := quicpogs.Metadata{
|
metadata := []quicpogs.Metadata{}
|
||||||
Key: tracing.CanonicalCloudflaredTracingHeader,
|
// Only add tracing if provided by origintunneld
|
||||||
Val: tracePropagation,
|
if tracePropagation != "" {
|
||||||
|
metadata = append(metadata, quicpogs.Metadata{
|
||||||
|
Key: tracing.CanonicalCloudflaredTracingHeader,
|
||||||
|
Val: tracePropagation,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
s.connectResponseSent = true
|
s.connectResponseSent = true
|
||||||
return s.WriteConnectResponseData(nil, metadata)
|
return s.WriteConnectResponseData(nil, metadata...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// httpResponseAdapter translates responses written by the HTTP Proxy into ones that can be used in QUIC.
|
// httpResponseAdapter translates responses written by the HTTP Proxy into ones that can be used in QUIC.
|
||||||
|
|
Loading…
Reference in New Issue