concatenate additional url paths to protohttp.TapReqToUrl (#4151)

* concatenate additional url paths to protohttp.TapReqToUrl

Signed-off-by: Charles Pretzer <charles@buoyant.io>

* fix formatting
This commit is contained in:
cpretzer 2020-03-11 10:34:05 -07:00 committed by GitHub
parent 80935f0ba7
commit 0b8272bdf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package tap
import ( import (
"bufio" "bufio"
"bytes" "bytes"
"fmt"
"io" "io"
"net/http" "net/http"
"net/url" "net/url"
@ -37,7 +38,7 @@ func Reader(k8sAPI *k8s.KubernetesAPI, req *pb.TapByResourceRequest, timeout tim
if err != nil { if err != nil {
return nil, nil, err return nil, nil, err
} }
url.Path = protohttp.TapReqToURL(req) url.Path = fmt.Sprintf("%s%s", url.Path, protohttp.TapReqToURL(req))
httpReq, err := http.NewRequest( httpReq, err := http.NewRequest(
http.MethodPost, http.MethodPost,