mirror of https://github.com/perkeep/perkeep.git
Merge branch 'master' of ssh://camlistore.org:29418/camlistore
This commit is contained in:
commit
d1cb36da9f
|
@ -5,13 +5,15 @@ use FindBin qw($Bin);
|
|||
use Getopt::Long;
|
||||
|
||||
sub usage {
|
||||
die "Usage: dev-appengine [--wipe] [-a] -- [other_dev_appserver_opts]";
|
||||
die "Usage: dev-appengine [--wipe] [-a] [-p port] -- [other_dev_appserver_opts]";
|
||||
}
|
||||
|
||||
my $opt_wipe;
|
||||
my $opt_port;
|
||||
my $opt_all; # listen on all interfaces
|
||||
GetOptions("wipe" => \$opt_wipe,
|
||||
"all" => \$opt_all,
|
||||
"p=i" => \$opt_port,
|
||||
) or usage();
|
||||
|
||||
my $sdk = readlink("$Bin/appengine-sdk")
|
||||
|
@ -29,6 +31,11 @@ if ($opt_all) {
|
|||
if ($opt_wipe) {
|
||||
push @args, "--clear_datastore";
|
||||
}
|
||||
if ($opt_port) {
|
||||
push @args, "-p", "$opt_port";
|
||||
} else {
|
||||
push @args, "-p", "3179";
|
||||
}
|
||||
push @args, @ARGV;
|
||||
|
||||
push @args, "$Bin/server/go/appengine";
|
||||
|
@ -36,4 +43,3 @@ push @args, "$Bin/server/go/appengine";
|
|||
print "\$ @args\n";
|
||||
|
||||
exec(@args);
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ func handleRemove(conn http.ResponseWriter, req *http.Request, storage blobserve
|
|||
configer, ok := storage.(blobserver.Configer)
|
||||
if !ok {
|
||||
conn.WriteHeader(http.StatusForbidden)
|
||||
fmt.Fprintf(conn, "Remove handler's blobserver.Storage isn't a blobserver.Configuer; can't remove")
|
||||
fmt.Fprintf(conn, "Remove handler's blobserver.Storage isn't a blobserver.Configer; can't remove")
|
||||
return
|
||||
}
|
||||
if !configer.Config().IsQueue {
|
||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
package main
|
||||
package server
|
||||
|
||||
import (
|
||||
"fmt"
|
|
@ -82,8 +82,12 @@ func realInit(w http.ResponseWriter, r *http.Request) bool {
|
|||
|
||||
// Update the config to use the URL path derived from the first App Engine request.
|
||||
// TODO(bslatkin): Support hostnames that aren't x.appspot.com
|
||||
// TODO(bslatkin): Support the HTTPS scheme
|
||||
baseURL := fmt.Sprintf("http://%s/", r.Header.Get("X-Appengine-Default-Version-Hostname"))
|
||||
scheme := "http"
|
||||
if r.TLS != nil {
|
||||
scheme = "https"
|
||||
}
|
||||
|
||||
baseURL := fmt.Sprintf("%s://%s/", scheme, appengine.DefaultVersionHostname(ctx))
|
||||
ctx.Infof("baseurl = %q", baseURL)
|
||||
config.Obj["baseURL"] = baseURL
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
../../../../../lib/go/camli/misc/countingreader.go
|
|
@ -1,6 +1,6 @@
|
|||
{ "_for-emacs": "-*- mode: js2;-*-",
|
||||
"baseURL": "*** Populated by runtime. Ignore this.",
|
||||
"auth": "userpass:foo:bar",
|
||||
"auth": "userpass:camlistore:pass3179",
|
||||
"prefixes": {
|
||||
|
||||
"/ui/": {
|
||||
|
|
Loading…
Reference in New Issue