Bug 532369 - Replace octal numbers in httpd.js with manual bit-shifts and bit-ors, to avoid strict warnings. Obvious enough for r=try

--HG--
extra : rebase_source : d110239cac4967d7bd278c3c931f10fe78229860
This commit is contained in:
Jeff Walden 2012-10-05 17:04:12 -07:00
Родитель 01cbfb590a
Коммит 2a0b543a85
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -2111,6 +2111,7 @@ function toInternalPath(path, encoded)
return comps.join("/");
}
const PERMS_READONLY = (4 << 6) | (4 << 3) | 4;
/**
* Adds custom-specified headers for the given file to the given response, if
@ -2138,7 +2139,7 @@ function maybeAddHeaders(file, metadata, response)
return;
const PR_RDONLY = 0x01;
var fis = new FileInputStream(headerFile, PR_RDONLY, 0444,
var fis = new FileInputStream(headerFile, PR_RDONLY, PERMS_READONLY,
Ci.nsIFileInputStream.CLOSE_ON_EOF);
try
@ -2673,7 +2674,7 @@ ServerHandler.prototype =
var type = this._getTypeFromFile(file);
if (type === SJS_TYPE)
{
var fis = new FileInputStream(file, PR_RDONLY, 0444,
var fis = new FileInputStream(file, PR_RDONLY, PERMS_READONLY,
Ci.nsIFileInputStream.CLOSE_ON_EOF);
try
@ -2767,7 +2768,7 @@ ServerHandler.prototype =
maybeAddHeaders(file, metadata, response);
response.setHeader("Content-Length", "" + count, false);
var fis = new FileInputStream(file, PR_RDONLY, 0444,
var fis = new FileInputStream(file, PR_RDONLY, PERMS_READONLY,
Ci.nsIFileInputStream.CLOSE_ON_EOF);
offset = offset || 0;