Skip to content

Commit

Permalink
Addressed twifkak comments: refactored IsHealthy, also added healthz …
Browse files Browse the repository at this point in the history
…http handler.
  • Loading branch information
banaag committed Oct 23, 2019
1 parent 8c67122 commit bb2b939
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packager/signer/signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ type Signer struct {
client *http.Client
urlSets []util.URLSet
rtvCache *rtv.RTVCache
shouldPackage func() bool
shouldPackage func() error
overrideBaseURL *url.URL
requireHeaders bool
forwardedRequestHeaders []string
Expand Down Expand Up @@ -460,7 +460,7 @@ func (this *Signer) serveSignedExchange(resp http.ResponseWriter, fetchResp *htt
fetchResp.Header.Get("Content-Security-Policy")))

exchange := signedexchange.NewExchange(
accept.SxgVersion, /*uri=*/signURL.String(), /*method=*/"GET",
accept.SxgVersion /*uri=*/, signURL.String() /*method=*/, "GET",
http.Header{}, fetchResp.StatusCode, fetchResp.Header, []byte(transformed))
if err := exchange.MiEncodePayload(miRecordSize); err != nil {
util.NewHTTPError(http.StatusInternalServerError, "Error MI-encoding: ", err).LogAndRespond(resp)
Expand Down
4 changes: 4 additions & 0 deletions packager/signer/signer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ func (this fakeCertHandler) GetLatestCert() (*x509.Certificate) {
return pkgt.Certs[0]
}

<<<<<<< HEAD
func (this fakeCertHandler) IsHealthy() error {
=======
func (this fakeCertHandler) IsHealthy() error {
>>>>>>> Addressed twifkak comments: refactored IsHealthy, also added healthz http handler.
return nil
}

Expand Down

0 comments on commit bb2b939

Please sign in to comment.