@@ -464,6 +464,10 @@ func TestRouterPathSpecificity(t *testing.T) {
464
464
if _ , err := getRoute (routeAddress , "www.example.com" , "http" , nil , "" ); err != ErrUnavailable {
465
465
t .Fatalf ("unexpected response: %q" , err )
466
466
}
467
+ //ensure you can curl path with port in Host header
468
+ if err := waitForRoute (routeTestAddress , "www.example.com:80" , "http" , nil , tr .HelloPodPath ); err != nil {
469
+ t .Fatalf ("unexpected response: %q" , err )
470
+ }
467
471
468
472
//create newer, conflicting path based route
469
473
endpointEvent = & watch.Event {
@@ -499,6 +503,9 @@ func TestRouterPathSpecificity(t *testing.T) {
499
503
if err := waitForRoute (routeTestAddress , "www.example.com" , "http" , nil , tr .HelloPodPath ); err != nil {
500
504
t .Fatalf ("unexpected response: %q" , err )
501
505
}
506
+ if err := waitForRoute (routeTestAddress , "www.example.com:80" , "http" , nil , tr .HelloPodPath ); err != nil {
507
+ t .Fatalf ("unexpected response: %q" , err )
508
+ }
502
509
503
510
//create host based route
504
511
routeEvent = & watch.Event {
@@ -526,6 +533,9 @@ func TestRouterPathSpecificity(t *testing.T) {
526
533
if err := waitForRoute (routeAddress , "www.example.com" , "http" , nil , tr .HelloPod ); err != nil {
527
534
t .Fatalf ("unexpected response: %q" , err )
528
535
}
536
+ if err := waitForRoute (routeTestAddress , "www.example.com:80" , "http" , nil , tr .HelloPodPath ); err != nil {
537
+ t .Fatalf ("unexpected response: %q" , err )
538
+ }
529
539
530
540
//delete path based route
531
541
routeEvent = & watch.Event {
@@ -558,6 +568,9 @@ func TestRouterPathSpecificity(t *testing.T) {
558
568
if err := waitForRoute (routeAddress , "www.example.com" , "http" , nil , tr .HelloPod ); err != nil {
559
569
t .Fatalf ("unexpected response: %q" , err )
560
570
}
571
+ if err := waitForRoute (routeTestAddress , "www.example.com:80" , "http" , nil , tr .HelloPodPath ); err != nil {
572
+ t .Fatalf ("unexpected response: %q" , err )
573
+ }
561
574
562
575
// create newer, conflicting host based route that is ignored
563
576
routeEvent = & watch.Event {
@@ -584,6 +597,9 @@ func TestRouterPathSpecificity(t *testing.T) {
584
597
if err := waitForRoute (routeAddress , "www.example.com" , "http" , nil , tr .HelloPod ); err != nil {
585
598
t .Fatalf ("unexpected response: %q" , err )
586
599
}
600
+ if err := waitForRoute (routeTestAddress , "www.example.com:80" , "http" , nil , tr .HelloPodPath ); err != nil {
601
+ t .Fatalf ("unexpected response: %q" , err )
602
+ }
587
603
588
604
//create old, conflicting host based route which should take over the route
589
605
routeEvent = & watch.Event {
@@ -610,6 +626,9 @@ func TestRouterPathSpecificity(t *testing.T) {
610
626
if err := waitForRoute (routeAddress , "www.example.com" , "http" , nil , tr .HelloPodAlternate ); err != nil {
611
627
t .Fatalf ("unexpected response: %q" , err )
612
628
}
629
+ if err := waitForRoute (routeTestAddress , "www.example.com:80" , "http" , nil , tr .HelloPodPath ); err != nil {
630
+ t .Fatalf ("unexpected response: %q" , err )
631
+ }
613
632
614
633
// Clean up the host-based route and endpoint.
615
634
routeEvent = & watch.Event {
0 commit comments