diff --git a/pkg/faces/faceserver.go b/pkg/faces/faceserver.go index 23c2970..dba3290 100644 --- a/pkg/faces/faceserver.go +++ b/pkg/faces/faceserver.go @@ -88,10 +88,10 @@ func (srv *FaceServer) SetupFromEnvironment() { fmt.Printf("%s %s: colorService %v\n", time.Now().Format(time.RFC3339), srv.Name, srv.colorService) } -func (srv *FaceServer) makeRequest(user string, userAgent string, service string, keyword string, subrequest string) *FaceResponse { +func (srv *FaceServer) makeRequest(user string, userAgent string, service string, keyword string, subrequest string, row int, col int) *FaceResponse { start := time.Now() - url := fmt.Sprintf("http://%s/%s/", service, subrequest) + url := fmt.Sprintf("http://%s/%s/?row=%d&col=%d", service, subrequest, row, col) if srv.debugEnabled { fmt.Printf("%s %s: %s starting\n", time.Now().Format(time.RFC3339), srv.Name, url) @@ -265,7 +265,7 @@ func (srv *FaceServer) faceGetHandler(r *http.Request, rstat *BaseRequestStatus) colorCh := make(chan *FaceResponse) go func() { - smileyCh <- srv.makeRequest(user, userAgent, srv.smileyService, "smiley", subrequest) + smileyCh <- srv.makeRequest(user, userAgent, srv.smileyService, "smiley", subrequest, row, column) }() go func() { diff --git a/pkg/faces/guiserver.go b/pkg/faces/guiserver.go index 273bb77..75c25c2 100644 --- a/pkg/faces/guiserver.go +++ b/pkg/faces/guiserver.go @@ -133,6 +133,13 @@ func (srv *GUIServer) guiGetHandler(w http.ResponseWriter, r *http.Request) { reqStart := time.Now() url := fmt.Sprintf("http://face/%s", r.URL.Path[6:]) + + rq := r.URL.RawQuery + + if rq != "" { + url = fmt.Sprintf("%s?%s", url, rq) + } + user := r.Header.Get(srv.userHeaderName) if user == "" { user = "unknown" diff --git a/pkg/faces/ingressserver.go b/pkg/faces/ingressserver.go index 267a600..5a1bf87 100644 --- a/pkg/faces/ingressserver.go +++ b/pkg/faces/ingressserver.go @@ -83,6 +83,12 @@ func (srv *IngressServer) ingressGetHandler(r *http.Request, rstat *BaseRequestS } else { url := fmt.Sprintf("http://%s%s", srv.faceService, r.URL.Path) + rq := r.URL.RawQuery + + if rq != "" { + url = fmt.Sprintf("%s?%s", url, rq) + } + if srv.debugEnabled { fmt.Printf("%s %s: %s starting\n", time.Now().Format(time.RFC3339), srv.Name, url) }