File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -1988,7 +1988,6 @@ function! rails#get_binding_for(pid) abort
19881988    elseif  executable (' netstat' 
19891989      let  output =  system (' netstat -antp' 
19901990      let  binding =  matchstr (output, ' \S\+:\d\+\ze\s\+\S\+\s\+LISTEN\s\+' a: pid' /' 
1991-       return  empty (binding) ? ' ' ' http://' s: sub' ^([^[]*:.*):' ' [\1]:' 
19921991    else 
19931992      let  binding =  ' ' 
19941993    endif 
@@ -1997,7 +1996,15 @@ function! rails#get_binding_for(pid) abort
19971996  if  empty (binding)
19981997    return  ' ' 
19991998  endif 
2000-   return  ' http://' 
1999+   let  accepts_ssl =  0 
2000+   if  s: webcat= ~# ' ^curl' 
2001+     call  system (' curl --max-time=2 -k --silent --head --fail ' shellescape (' https://' 
2002+     let  accepts_ssl =  ! v: shell_error
2003+   elseif  s: webcat= ~# ' ^wget' 
2004+     call  system (' wget --timeout=2 --no-check-certificate --method=HEAD -q -S ' shellescape (' https://' 
2005+     let  accepts_ssl =  ! v: shell_error
2006+   endif 
2007+   return  (accepts_ssl ? ' https://' ' http://' 
20012008endfunction 
20022009
20032010function !  s: ServerCommandbg , arg) abort 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments