Skip to content

Commit 11f4f4c

Browse files
committed
Update rRcurl.js
Add sanitization to string url
1 parent daa10e3 commit 11f4f4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

codegens/r-rcurl/lib/rRcurl.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ function getSnippetRequest (url, method, style, hasParams, hasHeaders, contentTy
361361
filesInfo);
362362
}
363363
if (methodUC === 'POST') {
364-
return getSnippetPostFormInOptions(url, 'post', hasParams, hasHeaders, requestTimeout, followRedirect);
364+
return getSnippetPostFormInOptions(url, style, hasParams, hasHeaders, requestTimeout, followRedirect);
365365
}
366366
if (methodUC === 'PUT') {
367367
return getSnippetPut(url, hasParams, hasHeaders, requestTimeout, followRedirect);
@@ -447,7 +447,7 @@ function convert (request, options, callback) {
447447
followRedirect = options.followRedirect,
448448
ignoreWarnings = options.ignoreWarnings,
449449
contentTypeHeaderValue = request.headers.get('Content-Type'),
450-
url = getRequestURL(request),
450+
url = sanitizeString(getRequestURL(request)),
451451
snippetHeaders = getSnippetHeaders(getRequestHeaders(request), indentation),
452452
snippetHeader = getSnippetHeader(ignoreWarnings),
453453
snippetFooter = getSnippetFooter();

0 commit comments

Comments
 (0)