Replace spaces in file paths with %20 (for repository ids with spaces)

This commit is contained in:
Gilbert Chen
2018-01-20 22:59:41 -05:00
parent 9898f77d9c
commit e5beb55336
2 changed files with 3 additions and 2 deletions

View File

@@ -153,7 +153,7 @@ func (client *B2Client) call(url string, method string, requestHeaders map[strin
return response.Body, response.Header, response.ContentLength, nil
}
LOG_DEBUG("BACKBLAZE_CALL", "URL request '%s' returned status code %d", url, response.StatusCode)
LOG_DEBUG("BACKBLAZE_CALL", "URL request '%s %s' returned status code %d", method, url, response.StatusCode)
io.Copy(ioutil.Discard, response.Body)
response.Body.Close()
@@ -170,7 +170,6 @@ func (client *B2Client) call(url string, method string, requestHeaders map[strin
continue
} else if response.StatusCode == 404 {
if http.MethodHead == method {
LOG_DEBUG("BACKBLAZE_CALL", "URL request '%s' returned status code %d", url, response.StatusCode)
return nil, nil, 0, nil
}
} else if response.StatusCode == 416 {