Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration to consider all requests chunked #459

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
language: node_js
- 0.10
env:
thibPG marked this conversation as resolved.
Show resolved Hide resolved
- SKIP_JAVA_VERSION_CHECK=true
install:
- npm install
before_script:
Expand Down
10 changes: 5 additions & 5 deletions bin/calcdeps.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ deps.build = function(infos) {
// Add each provided namespace from that file to the map.
info.provides.forEach(function(ns) {
if (ns in hash) {
$.util.error($.util.format(
console.error($.util.format(
'Duplicate provide for "%s" in %s and %s.',
ns, info.path, hash[ns].path));
process.exit(1);
Expand Down Expand Up @@ -377,7 +377,7 @@ deps.build = function(infos) {
deps.resolve = function(info, hash, ordered, seen) {
info.requires.forEach(function(ns) {
if (!(ns in hash)) {
$.util.error($.util.format(
console.error($.util.format(
thibPG marked this conversation as resolved.
Show resolved Hide resolved
'Missing provide for "%s" required by %s.',
ns, info.path));
process.exit(1);
Expand Down Expand Up @@ -409,13 +409,13 @@ deps.order = function(hash, inputs) {
if (tests.isNS(input)) {
var ns = NAMESPACE_REGEX.exec(input)[1];
if (!(ns in hash)) {
$.util.error($.util.format('Missing input namespace "%s".', ns));
console.error($.util.format('Missing input namespace "%s".', ns));
process.exit(1);
}
info = hash[ns];
} else {
if (!(input in hash)) {
$.util.error($.util.format('Missing input file "%s".', input));
console.error($.util.format('Missing input file "%s".', input));
process.exit(1);
}
info = hash[input];
Expand Down Expand Up @@ -532,7 +532,7 @@ function main(opts, args) {
} else if (opts.mode == 'concat') {
output = infos.map(function(info) { return info.content; }).join('\n');
} else {
$.util.error('Unknown output mode');
console.error('Unknown output mode');
process.exit(1);
}

Expand Down
17 changes: 11 additions & 6 deletions bin/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,15 @@ function requirements() {
var required = $.semver('1.7.0');
$.childProcess.exec('java -version', function(error, stdout, stderr) {
if (error || !stderr) {
$.util.error([
'Unable to get java version.',
'Please install java before building.',
].join('\n'));
console.error([
thibPG marked this conversation as resolved.
Show resolved Hide resolved
'Unable to get java version.',
'Please install java before building.',
].join('\n'));
process.exit(1);
}
if (process.env.SKIP_JAVA_VERSION_CHECK) {
return;
}
var version;
var installed;
try {
Expand All @@ -88,10 +91,12 @@ function requirements() {
installed = $.semver.parse(version.replace('_', '-'));
} catch (ex) {}
if (!installed || installed < required) {
$.util.error($.util.format([
console.error($.util.format(
[
'Installed java version "%s" is less than the required "%s".',
'Please upgrade java before building.'
].join('\n'), installed, required));
].join('\n'),
installed, required));
process.exit(1);
}
});
Expand Down
4 changes: 4 additions & 0 deletions src/client/net/xhr.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
goog.provide('spf.net.xhr');

goog.require('spf');
goog.require('spf.config');


/**
Expand Down Expand Up @@ -203,6 +204,9 @@ spf.net.xhr.isChunked_ = function(xhr) {
if (xhr.responseType == 'json') {
return false;
}
if (spf.config.get('assume-all-json-requests-chunked')) {
return true;
}
// Determine whether to process chunks as they arrive.
// This is only possible with chunked transfer encoding.
// Note: handle Transfer-Encoding header values like:
Expand Down