Skip to content

Commit 23caedd

Browse files
committed
Merge pull request #924 from Martii/Issue-432postTransformationOfSomeUnicodeForWarningHeader
Transform two common extended ASCII *(Unicode) chars to back ticks if present Auto-merge
2 parents fa6fe71 + 8bae4ed commit 23caedd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

controllers/scriptStorage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ exports.sendScript = function (aReq, aRes, aNext) {
265265
// Set up a `Warning` header with Q encoding under RFC2047
266266
msg = [
267267
'199 ' + aReq.headers.host + ' MINIFICATION WARNING (harmony):',
268-
' ' + rfc2047.encode(aE.message),
269-
' line: ' + aE.line + ' col: ' + aE.col + ' pos: ' + aE.pos
268+
' ' + rfc2047.encode(aE.message.replace(/\xAB/g, '`').replace(/\xBB/g, '`')),
269+
' line: ' + aE.line + ' col: ' + aE.col + ' pos: ' + aE.pos,
270270

271271
].join('\u0020'); // TODO: Watchpoint... *express*/*node* exception thrown with CRLF SPACE spec
272272

0 commit comments

Comments
 (0)