Skip to content

Commit

Permalink
wfe: consistently use "marshaling". (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein authored and Daniel McCarney committed Jul 29, 2019
1 parent 07e1be6 commit ae250d5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions wfe/wfe.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func (wfe *WebFrontEndImpl) HandleManagementFunc(
func (wfe *WebFrontEndImpl) sendError(prob *acme.ProblemDetails, response http.ResponseWriter) {
problemDoc, err := marshalIndent(prob)
if err != nil {
problemDoc = []byte("{\"detail\": \"Problem marshalling error message.\"}")
problemDoc = []byte("{\"detail\": \"Problem marshaling error message.\"}")
}

response.Header().Set("Content-Type", "application/problem+json; charset=utf-8")
Expand Down Expand Up @@ -922,7 +922,7 @@ func (wfe *WebFrontEndImpl) UpdateAccount(
}
err := wfe.writeJSONResponse(response, http.StatusOK, existingAcct)
if err != nil {
wfe.sendError(acme.InternalErrorProblem("Error marshalling account"), response)
wfe.sendError(acme.InternalErrorProblem("Error marshaling account"), response)
return
}
return
Expand Down Expand Up @@ -966,7 +966,7 @@ func (wfe *WebFrontEndImpl) UpdateAccount(

err = wfe.writeJSONResponse(response, http.StatusOK, newAcct)
if err != nil {
wfe.sendError(acme.InternalErrorProblem("Error marshalling account"), response)
wfe.sendError(acme.InternalErrorProblem("Error marshaling account"), response)
return
}
}
Expand Down Expand Up @@ -1171,7 +1171,7 @@ func (wfe *WebFrontEndImpl) NewAccount(
response.Header().Add("Location", acctURL)
err = wfe.writeJSONResponse(response, http.StatusCreated, newAcct)
if err != nil {
wfe.sendError(acme.InternalErrorProblem("Error marshalling account"), response)
wfe.sendError(acme.InternalErrorProblem("Error marshaling account"), response)
return
}
}
Expand Down Expand Up @@ -1498,7 +1498,7 @@ func (wfe *WebFrontEndImpl) NewOrder(
orderResp := wfe.orderForDisplay(storedOrder, request)
err = wfe.writeJSONResponse(response, http.StatusCreated, orderResp)
if err != nil {
wfe.sendError(acme.InternalErrorProblem("Error marshalling order"), response)
wfe.sendError(acme.InternalErrorProblem("Error marshaling order"), response)
return
}
}
Expand Down Expand Up @@ -1586,7 +1586,7 @@ func (wfe *WebFrontEndImpl) Order(
orderReq := wfe.orderForDisplay(order, request)
err := wfe.writeJSONResponse(response, http.StatusOK, orderReq)
if err != nil {
wfe.sendError(acme.InternalErrorProblem("Error marshalling order"), response)
wfe.sendError(acme.InternalErrorProblem("Error marshaling order"), response)
return
}
}
Expand Down Expand Up @@ -1749,7 +1749,7 @@ func (wfe *WebFrontEndImpl) FinalizeOrder(
response.Header().Add("Location", orderURL)
err = wfe.writeJSONResponse(response, http.StatusOK, orderReq)
if err != nil {
wfe.sendError(acme.InternalErrorProblem("Error marshalling order"), response)
wfe.sendError(acme.InternalErrorProblem("Error marshaling order"), response)
return
}
}
Expand Down Expand Up @@ -1876,7 +1876,7 @@ func (wfe *WebFrontEndImpl) Authz(
http.StatusOK,
prepAuthorizationForDisplay(authz))
if err != nil {
wfe.sendError(acme.InternalErrorProblem("Error marshalling authz"), response)
wfe.sendError(acme.InternalErrorProblem("Error marshaling authz"), response)
return
}
}
Expand Down Expand Up @@ -1928,7 +1928,7 @@ func (wfe *WebFrontEndImpl) Challenge(

err := wfe.writeJSONResponse(response, http.StatusOK, chal.Challenge)
if err != nil {
wfe.sendError(acme.InternalErrorProblem("Error marshalling challenge"), response)
wfe.sendError(acme.InternalErrorProblem("Error marshaling challenge"), response)
return
}
}
Expand Down Expand Up @@ -2119,7 +2119,7 @@ func (wfe *WebFrontEndImpl) updateChallenge(
response.Header().Add("Link", link(existingChal.Authz.URL, "up"))
err := wfe.writeJSONResponse(response, http.StatusOK, existingChal.Challenge)
if err != nil {
wfe.sendError(acme.InternalErrorProblem("Error marshalling challenge"), response)
wfe.sendError(acme.InternalErrorProblem("Error marshaling challenge"), response)
return
}
}
Expand Down

0 comments on commit ae250d5

Please sign in to comment.