@@ -124,6 +124,10 @@ function! http#get(url, ...)
124
124
if strlen (getdatastr)
125
125
let url .= " ?" . getdatastr
126
126
endif
127
+ let old_shellredir = &shellredir
128
+ if &shell = ~ " \\ (ba\\ |k\\ |z\\ )\\ ?sh"
129
+ set shellredir = >% s \ 2 >/dev/ tty
130
+ endif
127
131
if executable (' curl' )
128
132
let command = ' curl -L -s -k -i '
129
133
let quote = &shellxquote == ' "' ? " '" : ' "'
@@ -149,6 +153,7 @@ function! http#get(url, ...)
149
153
let command .= " " .quote.url.quote
150
154
let res = system (command )
151
155
endif
156
+ let &shellredir = old_shellredir
152
157
if res = ~ ' ^HTTP/1.\d 3' || res = ~ ' ^HTTP/1\.\d 200 Connection established'
153
158
let pos = stridx (res , " \r \n \r \n " )
154
159
if pos != -1
@@ -181,6 +186,10 @@ function! http#post(url, ...)
181
186
else
182
187
let postdatastr = postdata
183
188
endif
189
+ let old_shellredir = &shellredir
190
+ if &shell = ~ " \\ (ba\\ |k\\ |z\\ )\\ ?sh"
191
+ set shellredir = >% s \ 2 >/dev/ tty
192
+ endif
184
193
if executable (' curl' )
185
194
let command = ' curl -L -s -k -i -X ' .method
186
195
let quote = &shellxquote == ' "' ? " '" : ' "'
@@ -211,6 +220,7 @@ function! http#post(url, ...)
211
220
call writefile (split (postdatastr, " \n " ), file , " b" )
212
221
let res = system (command . " --post-data @" . quote.file .quote)
213
222
endif
223
+ let &shellredir = old_shellredir
214
224
call delete (file )
215
225
if res = ~ ' ^HTTP/1.\d 3' || res = ~ ' ^HTTP/1\.\d 200 Connection established'
216
226
let pos = stridx (res , " \r \n \r \n " )
0 commit comments