-
Notifications
You must be signed in to change notification settings - Fork 673
[proxy] Handle null HostConfigs gracefully in start #1488
Conversation
@paulbellamy Please review |
Could you just remove the I'd pick whichever's closer to how we handle unmarshal in the other interceptors. |
Also, what's the |
Also, does curl fail on response codes >= 400? Edit: Ah, curl can be made to with |
@@ -106,7 +106,7 @@ docker_api_on() { | |||
data=$4 | |||
shift 4 | |||
[ -z "$DEBUG" ] || greyly echo "Docker (API) on $host:$DOCKER_PORT: $method $url" >&2 | |||
echo -n "$data" | curl -s -X "$method" -H Content-Type:application/json "http://$host:$DOCKER_PORT/v1.15$url" -d @- | |||
echo -n "$data" | curl -s -o /dev/null -w "%{http_code}\n" -X "$method" -H Content-Type:application/json "http://$host:$DOCKER_PORT/v1.15$url" -d @- |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Yep, that would be simpler, good point.
It prints the status code of the curl request |
a36779b
to
79a8c6a
Compare
@paulbellamy @rade PTAL |
@@ -35,7 +35,7 @@ func (i *startContainerInterceptor) InterceptRequest(r *http.Request) error { | |||
} | |||
} | |||
|
|||
if err := marshalRequestBody(r, hostConfig); err != nil { | |||
if err := marshalRequestBody(r, *hostConfig); err != nil { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
79a8c6a
to
c24dc66
Compare
[proxy] Handle null HostConfigs gracefully in start Fixes #1481.
Fixes #1481