FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(http):fix jsonp callbackname is undefined by doxiaodong · Pull Request #14270 · angular/angular · GitHub

fix(http):fix jsonp callbackname is undefined - #14270

Closed
doxiaodong wants to merge 2 commits into
angular:masterfrom
doxiaodong:jsonp
Closed

fix(http):fix jsonp callbackname is undefined#14270
doxiaodong wants to merge 2 commits into
angular:masterfrom
doxiaodong:jsonp

Conversation

Copy link
Copy Markdown

fix #14267

Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

doxiaodong force-pushed the jsonp branch 2 times, most recently from b670a34 to 471a8e6 Compare February 3, 2017 09:14

Copy link
Copy Markdown

CLAs look good, thanks!

Copy link
Copy Markdown
Contributor

need to add a test to ensure that callback is actually executed to prevent such situations in the future

Copy link
Copy Markdown
Author

I update the callback name test, it can be any function name.

nextRequestID(): string { return `__req${_nextRequestId++}`; }

requestCallback(id: string): string { return `${JSONP_HOME}${id}_finished`; }
requestCallback(id: string): string { return _getJsonpCallbackName(id); }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

revert

});

it('callback name should not contain dots', () => {
it('callback name should be a function name', () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

as we saw testing callback name doesn't actually verify anything.
Need a test for Uncaught ReferenceError: __ng_jsonp____req0_finished is not defined arror

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

this callback name can be any validate function name, and I think it's enough. What to cause __ng_jsonp____req0_finished is not defined is the error of the data https://github.com/angular/angular/blob/master/modules/playground/src/jsonp/people.json#L2

alxhub self-requested a review February 10, 2017 20:20

DzmitryShylovich commented Feb 10, 2017
edited
Loading

Copy link
Copy Markdown
Contributor

@alxhub this pr will add callbacks to the global namespace (window). It may be very unexpected :)
@mhevery said he will revert 9e5617e (commit that introduced the bug)
and it's already fixed in 4.0 so I don't think you should merge this

alxhub commented Feb 10, 2017

Copy link
Copy Markdown
Member

I actually think it's okay, and the behavior is correct.

The callbacks are only there while the request is in progress, and some APIs have issues with dots in the callback names.

Copy link
Copy Markdown
Contributor

ok :)

Copy link
Copy Markdown
Author

so, If I need to resolve the conflicts?

Copy link
Copy Markdown
Author

how about this?

Copy link
Copy Markdown
Contributor

@doxiaodong it will be fixed in the new http module in 4.0
so I think you can close this

Copy link
Copy Markdown
Contributor

@doxiaodong What is the status of the task? @angular/http is deprecated, please closed PR

Copy link
Copy Markdown
Author

ok

doxiaodong closed this Mar 1, 2018

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 13, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Jsonp error Uncaught ReferenceError: __ng_jsonp____req0_finished is not defined after https://github.com/angular/angular/pull/13219

6 participants


Back | FazBrowse Home | New Git URL