Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions infra/conf/transport_internet.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ func (c *SplitHTTPConfig) Build() (proto.Message, error) {
switch c.UplinkDataPlacement {
case "":
c.UplinkDataPlacement = "body"
case "body":
case "cookie", "header":
if c.Mode != "packet-up" {
return nil, errors.New("UplinkDataPlacement can be " + c.UplinkDataPlacement + " only in packet-up mode")
Expand All @@ -334,15 +335,15 @@ func (c *SplitHTTPConfig) Build() (proto.Message, error) {
switch c.SessionPlacement {
case "":
c.SessionPlacement = "path"
case "cookie", "header", "query":
case "path", "cookie", "header", "query":
default:
return nil, errors.New("unsupported session placement: " + c.SessionPlacement)
}

switch c.SeqPlacement {
case "":
c.SeqPlacement = "path"
case "cookie", "header", "query":
case "path", "cookie", "header", "query":
if c.SessionPlacement == "path" {
return nil, errors.New("SeqPlacement must be path when SessionPlacement is path")
}
Expand Down
11 changes: 6 additions & 5 deletions transport/internet/splithttp/dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,6 @@ func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.Me
requestURL.Host = dest.Address.String()
}

sessionId := ""
if transportConfiguration.Mode != "stream-one" {
sessionIdUuid := uuid.New()
sessionId = sessionIdUuid.String()
}
requestURL.Path = transportConfiguration.GetNormalizedPath()
requestURL.RawQuery = transportConfiguration.GetNormalizedQuery()

Expand All @@ -293,6 +288,12 @@ func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.Me
}
}

sessionId := ""
if mode != "stream-one" {
sessionIdUuid := uuid.New()
sessionId = sessionIdUuid.String()
}

errors.LogInfo(ctx, fmt.Sprintf("XHTTP is dialing to %s, mode %s, HTTP version %s, host %s", dest, mode, httpVersion, requestURL.Host))

requestURL2 := requestURL
Expand Down