This repository was archived by the owner on Jun 2, 2021. It is now read-only.
Commit 0e8a6e6
V3:
TCP domains don't accept `host` or `path` in the body of the request.
`path` is an HTTP attribute, and thus makes no sense for a TCP domain.
Although you could make the argument that `host` is not an HTTP
attribute, its purpose is to enable [Name-based Virtual Host
Support](https://httpd.apache.org/docs/2.4/vhosts/name-based.html),
which again is HTTP-thing. This is usually accomplished with a wildcard
DNS entry (e.g. `*.domain.tld).
Many Cloud Foundry installations have a TCP domain, with an IP
address/load balancer distinct from the shared app domain. Often the
DNS entry's hostname is `tcp`, as in `tcp.domain.tld`.
The convention we are using to identify a TCP domain is the following:
- if it's running on k8s, it's an "http" domain (this will change)
- if `router_group.guid` is populated, it's a "tcp" domain.
- The route controller has an awkward method,
`unprocessable_non_http_protocols(message, domain)`; its sole purpose is
to appease RuboCop's `Metrics/CyclomaticComplexity` requirements. Yes,
we are not happy about it either.
- We yanked the `protocols` method (which returns the domain's protocols,
currently "http" and "tcp") out of the presenter and thrust it into the
model, which is a more appropriate home. We also backfilled tests for
it.
[finishes #169636853]
Co-authored-by: Mona Mohebbi <mmohebbi@pivotal.io>
Co-authored-by: Brian Cunnie <bcunnie@pivotal.io>POST /v3/routes on TCP domains: no host/path1 parent 5f0c5c4 commit 0e8a6e6
3 files changed
Lines changed: 112 additions & 1 deletion
File tree
- app/controllers/v3
- spec
- request
- unit/models/runtime
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
| |||
222 | 225 | | |
223 | 226 | | |
224 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
225 | 236 | | |
226 | 237 | | |
227 | 238 | | |
| |||
239 | 250 | | |
240 | 251 | | |
241 | 252 | | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
242 | 264 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
938 | 938 | | |
939 | 939 | | |
940 | 940 | | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
941 | 996 | | |
942 | 997 | | |
943 | 998 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
118 | 152 | | |
119 | 153 | | |
120 | 154 | | |
| |||
0 commit comments