@@ -3,7 +3,6 @@ Class SourceControl.Git.WebUIDriver
33
44ClassMethod HandleRequest (pagePath As %String , InternalName As %String = " " , Output handled As %Boolean = 0 , Output %data As %Stream .Object )
55{
6- do %session .Unlock ()
76 // Make sure we capture any stray output
87 set buffer = ##class (SourceControl.Git.Util.Buffer ).%New ()
98 do buffer .BeginCaptureOutput ()
@@ -13,6 +12,7 @@ ClassMethod HandleRequest(pagePath As %String, InternalName As %String = "", Out
1312 #dim %request as %CSP.Request
1413 set pathStart = $piece (pagePath ," /" ,2 )
1514 if pathStart = " api" {
15+ do %session .Unlock ()
1616 set handled = 1
1717 set %data = ##class (%Stream.FileCharacter ).%New ()
1818 if $extract (pagePath ,6 ,*) = " userinfo" {
@@ -42,6 +42,7 @@ ClassMethod HandleRequest(pagePath As %String, InternalName As %String = "", Out
4242 SimpleHTTPRequestHandler.do_GET(self)
4343 */
4444 if (pathStart = " git" ) {
45+ do %session .Unlock ()
4546 if $piece (pagePath ," /" ,3 ) = " cat-file" {
4647 set blob = $piece (pagePath ," /" ,4 )
4748 set name = $Piece (pagePath ," /" ,*)
@@ -107,6 +108,10 @@ ClassMethod HandleRequest(pagePath As %String, InternalName As %String = "", Out
107108 }
108109 set readOnlyCommands = $listbuild (" branch" ," tag" ," log" ," ls-files" ," ls-tree" ," show" ," status" ," diff" )
109110 set baseCommand = $Piece (args (1 )," " )
111+
112+ if $listfind (readOnlyCommands ,baseCommand ) {
113+ do %session .Unlock ()
114+ }
110115
111116 set gitArgs ($increment (gitArgs )) = " color.ui=true"
112117
0 commit comments