hashicorp / consul-demo-traffic-splitting

Example application using Docker Compose to demonstrate Consul Service Mesh Traffic Splitting
Mozilla Public License 2.0
23 stars 21 forks source link

No newline in output returned from `curl localhost:9090` #4

Open judithpatudith opened 4 years ago

judithpatudith commented 4 years ago

I was incorporating Paul's comments from the splitting guide PR and he noted that the % printed in the output when you query the API service is confusing:

judithmalnick@Judiths-MBP:~|⇒  curl localhost:9090
Hello World
###Upstream Data: localhost:9091###
  Service V1%        

It turns out that the % is a "feature" of zsh that the shell adds when there's no newline returned with the output. When I switched to bash, the new command prompt always appeared concatenated with the last line of output, which also made the API version hard to see:

bash-3.2$ curl localhost:9090
Hello World
###Upstream Data: localhost:9091###
  Service V2bash-3.2$ 

Can we add a new line to the output from the API service? That would probably be the easiest fix here if its possible.