t/lib-httpd: recognize */smart/* repos as smart-http
We do not currently test authentication for smart-http repos at all. Part of the infrastructure to do this is recognizing that auth/smart is indeed a smart-http repo. The current apache config recognizes only "^/smart/*" as smart-http. Let's instead treat anything with /smart/ in the URL as smart-http. This is obviously a stupid thing to do for a real production site, but for our test suite we know that our repositories will not have this magic string in the name. Note that we will route /foo/smart/bar.git directly to git-http-backend/bar.git; in other words, everything before the "/smart/" is irrelevant to finding the repo on disk (but may impact apache config, for example by triggering auth checks). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
05b577107d
commit
666aae9aed
@ -45,22 +45,20 @@ ErrorLog error.log
|
|||||||
Alias /dumb/ www/
|
Alias /dumb/ www/
|
||||||
Alias /auth/dumb/ www/auth/dumb/
|
Alias /auth/dumb/ www/auth/dumb/
|
||||||
|
|
||||||
<Location /smart/>
|
<LocationMatch /smart/>
|
||||||
SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
|
SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
|
||||||
SetEnv GIT_HTTP_EXPORT_ALL
|
SetEnv GIT_HTTP_EXPORT_ALL
|
||||||
</Location>
|
</LocationMatch>
|
||||||
<Location /smart_noexport/>
|
<LocationMatch /smart_noexport/>
|
||||||
SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
|
SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
|
||||||
</Location>
|
</LocationMatch>
|
||||||
<Location /smart_custom_env/>
|
<LocationMatch /smart_custom_env/>
|
||||||
SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
|
SetEnv GIT_EXEC_PATH ${GIT_EXEC_PATH}
|
||||||
SetEnv GIT_HTTP_EXPORT_ALL
|
SetEnv GIT_HTTP_EXPORT_ALL
|
||||||
SetEnv GIT_COMMITTER_NAME "Custom User"
|
SetEnv GIT_COMMITTER_NAME "Custom User"
|
||||||
SetEnv GIT_COMMITTER_EMAIL custom@example.com
|
SetEnv GIT_COMMITTER_EMAIL custom@example.com
|
||||||
</Location>
|
</LocationMatch>
|
||||||
ScriptAlias /smart/ ${GIT_EXEC_PATH}/git-http-backend/
|
ScriptAliasMatch /smart_*[^/]*/(.*) ${GIT_EXEC_PATH}/git-http-backend/$1
|
||||||
ScriptAlias /smart_noexport/ ${GIT_EXEC_PATH}/git-http-backend/
|
|
||||||
ScriptAlias /smart_custom_env/ ${GIT_EXEC_PATH}/git-http-backend/
|
|
||||||
<Directory ${GIT_EXEC_PATH}>
|
<Directory ${GIT_EXEC_PATH}>
|
||||||
Options None
|
Options None
|
||||||
</Directory>
|
</Directory>
|
||||||
|
Loading…
Reference in New Issue
Block a user