Skip to content

Commit fe778e2

Browse files
fixup password for old version (microsoft#5971)
1 parent 6ec3120 commit fe778e2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/client/datascience/jupyter/jupyterPasswordConnect.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ export class JupyterPasswordConnect implements IJupyterPasswordConnect {
110110

111111
const response = await fetchFunction(`${url}login?`, {
112112
method: 'post',
113-
headers: { Cookie: `_xsrf=${xsrfCookie}`, Connection: 'keep-alive' },
114-
body: postParams,
113+
headers: { Cookie: `_xsrf=${xsrfCookie}`, Connection: 'keep-alive', 'content-type': 'application/x-www-form-urlencoded;charset=UTF-8' },
114+
body: postParams.toString(),
115115
redirect: 'manual'
116116
});
117117

src/test/datascience/jupyterPasswordConnect.unit.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ suite('JupyterPasswordConnect', () => {
5353
//tslint:disable-next-line:no-http-string
5454
fetchMock.setup(fm => fm('http://TESTNAME:8888/login?', typemoq.It.isObjectWith({
5555
method: 'post',
56-
headers: { Cookie: `_xsrf=${xsrfValue}`, Connection: 'keep-alive' }
56+
headers: { Cookie: `_xsrf=${xsrfValue}`, Connection: 'keep-alive', 'content-type': 'application/x-www-form-urlencoded;charset=UTF-8' }
5757
}))).returns(() => Promise.resolve(mockSessionResponse.object)).verifiable(typemoq.Times.once());
5858

5959
//tslint:disable-next-line:no-http-string

0 commit comments

Comments
 (0)