Skip to content

Commit

Permalink
do not add \r if already has it
Browse files Browse the repository at this point in the history
  • Loading branch information
jkwlui committed Sep 27, 2018
1 parent b00bf42 commit a8d3f66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test.media.ts
Expand Up @@ -37,7 +37,7 @@ async function testMultpart(drive: drive_v2.Drive) {
res.request.headers['content-type'].indexOf('multipart/related;'), 0);
const boundary =
res.request.headers['content-type'].replace(boundaryPrefix, '');
expectedResp = expectedResp.replace(/\n/g, '\r\n')
expectedResp = expectedResp.replace(/\r?\n/g, '\r\n')
.replace(/\$boundary/g, boundary)
.replace('$media', media.body)
.replace('$resource', JSON.stringify(requestBody))
Expand All @@ -61,7 +61,7 @@ async function testMediaBody(drive: drive_v2.Drive) {
res.request.headers['content-type'].indexOf('multipart/related;'), 0);
const boundary =
res.request.headers['content-type'].replace(boundaryPrefix, '');
expectedResp = expectedResp.replace(/\n/g, '\r\n')
expectedResp = expectedResp.replace(/\r?\n/g, '\r\n')
.replace(/\$boundary/g, boundary)
.replace('$media', media.body)
.replace('$resource', JSON.stringify(requestBody))
Expand Down

0 comments on commit a8d3f66

Please sign in to comment.