Remove "ms" from durations in HTTP response header
This commit is contained in:
parent
0b68bd493f
commit
ec62ceaeac
|
@ -214,9 +214,9 @@ func waitForResponse(rawTextRequestID string, w http.ResponseWriter) {
|
|||
if rawTextRequestResponse, ok = rawTextRequests[rawTextRequestID]; ok {
|
||||
jsonResponse = unpackResponse(rawTextRequestResponse)
|
||||
totalTime = getTotalTiming(rawTextRequests[rawTextRequestID+"-start"])
|
||||
pageLoad = fmt.Sprintf("%dms", jsonResponse.PageloadDuration)
|
||||
parsing = fmt.Sprintf("%dms", jsonResponse.ParsingDuration)
|
||||
w.Header().Set("X-Browsh-Duration-Total", totalTime+"ms")
|
||||
pageLoad = fmt.Sprintf("%d", jsonResponse.PageloadDuration)
|
||||
parsing = fmt.Sprintf("%d", jsonResponse.ParsingDuration)
|
||||
w.Header().Set("X-Browsh-Duration-Total", totalTime)
|
||||
w.Header().Set("X-Browsh-Duration-Pageload", pageLoad)
|
||||
w.Header().Set("X-Browsh-Duration-Parsing", parsing)
|
||||
io.WriteString(w, jsonResponse.Text)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
package browsh
|
||||
|
||||
var browshVersion = "1.4.10"
|
||||
var browshVersion = "1.4.11"
|
||||
|
|
Loading…
Reference in a new issue