File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -109,11 +109,11 @@ def service_rpc(rpc)
109109 render :text => proc { |response , output |
110110 buf_length = 131072
111111 buf = @git_http_control_pipe . read ( buf_length )
112- while ( buf . length == buf_length )
112+ while ( ! ( buf . nil? ) && buf . length == buf_length )
113113 output . write ( buf )
114114 buf = @git_http_control_pipe . read ( buf_length )
115115 end
116- if ( buf . length > 0 )
116+ if ( ! ( buf . nil? ) && buf . length > 0 )
117117 output . write ( buf )
118118 end
119119 @git_http_control_pipe . close
@@ -192,11 +192,11 @@ def internal_send_file(reqfile, content_type)
192192 render :text => proc { |response , output |
193193 buf_length = 131072
194194 buf = @git_http_control_pipe . read ( buf_length )
195- while ( buf . length == buf_length )
195+ while ( ! ( buf . nil? ) && buf . length == buf_length )
196196 output . write ( buf )
197197 buf = @git_http_control_pipe . read ( buf_length )
198198 end
199- if ( buf . length > 0 )
199+ if ( ! ( buf . nil? ) && buf . length > 0 )
200200 output . write ( buf )
201201 end
202202 @git_http_control_pipe . close
You can’t perform that action at this time.
0 commit comments