Skip to content

Commit

Permalink
Respect Redirects in Curl Requests(#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
saranshsaini authored Jan 13, 2025
1 parent d152e6c commit 000de97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions autoload/codeium/command.vim
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function! s:commands.Auth(...) abort
endif

while empty(api_key) && tries < 3
let command = 'curl -sS ' . register_user_url . ' ' .
let command = 'curl -sSL ' . register_user_url . ' ' .
\ '--header "Content-Type: application/json" ' .
\ '--data ' . shellescape(json_encode({'firebase_id_token': auth_token}))
let response = system(command)
Expand All @@ -104,7 +104,7 @@ function! s:commands.Auth(...) abort
\ . 'Would you like to try auth without checking SSL certificate revocation? (y/n): ')
call inputrestore()
if useNoSsl ==? 'y'
let command = 'curl --ssl-no-revoke -sS ' . register_user_url . ' ' .
let command = 'curl --ssl-no-revoke -sSL ' . register_user_url . ' ' .
\ '--header "Content-Type: application/json" ' .
\ '--data ' . shellescape(json_encode({'firebase_id_token': auth_token}))
let response = system(command)
Expand Down
4 changes: 2 additions & 2 deletions autoload/codeium/server.vim
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function! codeium#server#Request(type, data, ...) abort
\ '/exa.language_server_pb.LanguageServerService/' . a:type
let data = json_encode(a:data)
let args = [
\ 'curl', uri,
\ 'curl', '-L', uri,
\ '--header', 'Content-Type: application/json',
\ '-d@-'
\ ]
Expand Down Expand Up @@ -188,7 +188,7 @@ function! codeium#server#Start(...) abort

let config = get(g:, 'codeium_server_config', {})
if has_key(config, 'portal_url') && !empty(config.portal_url)
let response = system('curl -s ' . config.portal_url . '/api/version')
let response = system('curl -sL ' . config.portal_url . '/api/version')
if v:shell_error == '0'
let s:language_server_version = response
let s:language_server_sha = 'enterprise-' . s:language_server_version
Expand Down

0 comments on commit 000de97

Please sign in to comment.