Fix illegal base64 errors
parent
61b3f3f659
commit
c518617f8d
|
@ -73,7 +73,7 @@ type Config struct {
|
|||
// Conf returns a copy of the Config used by the proxy.
|
||||
// Any modifications will not affect the original Config.
|
||||
func Conf() Config {
|
||||
loadConfigOnce.Do(func (){
|
||||
loadConfigOnce.Do(func() {
|
||||
if err := LoadConfig(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
|
|
@ -232,7 +232,11 @@ func handleContent(cc *contentConn) {
|
|||
var filenames []string
|
||||
|
||||
RequestLoop:
|
||||
for _, f := range cmd.Files {
|
||||
for i, f := range cmd.Files {
|
||||
if len(f.Base64SHA1)%2 != 0 {
|
||||
cmd.Files[i].Base64SHA1 += "="
|
||||
}
|
||||
|
||||
if cc.fromCache(f.Name, f.Base64SHA1) {
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue