mirror of https://github.com/perkeep/perkeep.git
camweb: Correct redirect URL for /gw/
Tested with: $ curl -i -L http://localhost:31798/gw/502aff1fd522c454e39a3723b596aca43d206d4e HTTP/1.1 302 Found Location: https://camlistore.googlesource.com/camlistore/+/502aff1fd522c454e39a3723b596aca43d206d4e Content-Type: text/html; charset=utf-8 Content-Length: 112 Date: Thu, 22 Aug 2013 03:05:28 GMT HTTP/1.1 200 OK Content-Type: text/html; charset=UTF-8 Cache-Control: no-cache, no-store, max-age=0, must-revalidate Pragma: no-cache Expires: Fri, 01 Jan 1990 00:00:00 GMT Date: Thu, 22 Aug 2013 03:05:28 GMT X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block Server: GSE Transfer-Encoding: chunked <!DOCTYPE HTML PUBLIC... Change-Id: Id10f8ea1668dee85f08d3e30947464a45dc4666a
This commit is contained in:
parent
f13fe9303f
commit
ad876efcb1
|
@ -189,7 +189,7 @@ func mainHandler(rw http.ResponseWriter, req *http.Request) {
|
|||
|
||||
if strings.HasPrefix(relPath, "gw/") {
|
||||
path := relPath[3:]
|
||||
http.Redirect(rw, req, "https://camlistore.googlesource.com/camlistore/+/HEAD/"+path, http.StatusFound)
|
||||
http.Redirect(rw, req, "https://camlistore.googlesource.com/camlistore/+/"+path, http.StatusFound)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue