angular-docs-cn/packages
Alex Rickabaugh 452a7ae88b fix(common): fix XSSI prefix stripping by using JSON.parse always (#18466)
Currently HttpClient sends requests for JSON data with the
XMLHttpRequest.responseType set to 'json'. With this flag, the browser
will attempt to parse the response as JSON, but will return 'null' on
any errors. If the JSON response contains an XSSI-prevention prefix,
this will cause the browser's parsing to fail, which is unrecoverable.

The only compelling reason to use the responseType 'json' is for
performance (especially if the browser offloads JSON parsing to a
separate thread). I'm not aware of any browser which does this currently,
nor of any plans to do so. JSON.parse and responseType 'json' both
end up using the same V8 code path in Chrome to implement the parse.

Thus, this change switches all JSON parsing in HttpClient to use
JSON.parse directly.

Fixes #18396, #18453.

PR Close #18466
2017-08-29 17:18:54 -07:00
..
animations feat(animations): report errors when invalid CSS properties are detected (#18718) 2017-08-21 20:38:22 -05:00
bazel build: disable sass under bazel(#18848) 2017-08-28 11:12:18 -07:00
benchpress perf: switch angular to use StaticInjector instead of ReflectiveInjector 2017-08-07 15:42:34 -07:00
common fix(common): fix XSSI prefix stripping by using JSON.parse always (#18466) 2017-08-29 17:18:54 -07:00
compiler fix(compiler): don’t reexport types in `.ngfactory` files (#18788) 2017-08-28 18:46:43 -05:00
compiler-cli fix(compiler): don’t emit stubs when we didn’t generate code for a file. (#18788) 2017-08-28 18:46:43 -05:00
core build: upgrade to latest bazel rules (#18733) 2017-08-23 11:34:52 -05:00
docs refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
examples feat(common): drop use of the Intl API to improve browser support (#18284) 2017-08-22 15:43:58 -05:00
forms feat(forms): add updateOn and ngFormOptions to NgForm 2017-08-16 15:25:34 -07:00
http feat: deprecate @angular/http in favor of @angular/common/http (#18906) 2017-08-28 18:46:58 -05:00
language-service feat(compiler): make `.ngsummary.json` files portable 2017-08-16 15:24:48 -07:00
platform-browser feat(animations): allow @.disabled property to work without an expression (#18713) 2017-08-18 23:28:04 -05:00
platform-browser-dynamic refactor(platform-browser-dynamic): keep preserveWhitespaces default setting in one place (#18772) 2017-08-22 15:56:12 -05:00
platform-server refactor(compiler): split compiler and core (#18683) 2017-08-16 17:58:53 -05:00
platform-webworker refactor(platform-webworker): remove deprecated `PRIMITIVE` (#18761) 2017-08-17 18:02:00 -05:00
platform-webworker-dynamic refactor(compiler): split compiler and core (#18683) 2017-08-16 17:58:53 -05:00
router Revert "refactor(router): remove deprecated `initialNavigation` options (#18781)" 2017-08-22 18:39:06 -05:00
tsc-wrapped fix(compiler-cli): propagate preserveWhitespaces option to codegen (#18773) 2017-08-21 17:32:10 -05:00
upgrade perf(core): Remove decorator DSL which depends on Reflect 2017-08-11 09:27:07 -07:00
README.md Revert "docs: Remove unneeded file (#18106)" 2017-07-20 16:46:47 -05:00
empty.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
es6-subset.d.ts refactor: update paths from modules/@angular to packages 2017-03-08 16:29:28 -08:00
license-banner.txt refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
system.d.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
tsconfig.json refactor(common): move generated locale files (#18907) 2017-08-29 11:26:10 -05:00
types.d.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00

README.md

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

License: MIT