Browse Source

Fix empty public url

pull/114/head
chrislusf 10 years ago
parent
commit
71e9b302d4
  1. 3
      go/weed/server.go
  2. 6
      go/weed/volume.go

3
go/weed/server.go

@ -228,6 +228,9 @@ func runServer(cmd *Command, args []string) bool {
if *volumePublicPort == 0 {
*volumePublicPort = *volumePort
}
if *serverPublicUrl == "" {
*serverPublicUrl = *serverIp + ":" + strconv.Itoa(*volumePublicPort)
}
isSeperatedPublicPort := *volumePublicPort != *volumePort
volumeMux := http.NewServeMux()
publicVolumeMux := volumeMux

6
go/weed/volume.go

@ -101,13 +101,13 @@ func runVolume(cmd *Command, args []string) bool {
if *v.ip == "" {
*v.ip = "127.0.0.1"
}
if *v.publicUrl == "" {
*v.publicUrl = *v.ip + ":" + strconv.Itoa(*v.port)
}
if *v.publicPort == 0 {
*v.publicPort = *v.port
}
if *v.publicUrl == "" {
*v.publicUrl = *v.ip + ":" + strconv.Itoa(*v.publicPort)
}
isSeperatedPublicPort := *v.publicPort != *v.port
volumeMux := http.NewServeMux()

Loading…
Cancel
Save