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

Fix #252: infinite loop because the "hypertext engine" generates invalid URLs #253

Merged
merged 1 commit into from
Mar 12, 2016

Conversation

cyrille-leclerc
Copy link
Contributor

Fix #252: infinite loop because the "hypertext engine" may duplicate the ? char generating invalid https://api.github.com/notifications?all=true&page=2?all=true instead of https://api.github.com/notifications?all=true&page=2&all=true.

A better fix will be to prevent duplication of parameters (all=true in this case).

…cate '?' generating invalid "https://api.github.com/notifications?all=true&page=2?all=true" instead of "https://api.github.com/notifications?all=true&page=2&all=true". A better fix will be to prevent duplication of parameters ("all=true" in this case).
@cyrille-leclerc
Copy link
Contributor Author

@reviewbybees esp @recena

@cyrille-leclerc
Copy link
Contributor Author

Note: I preferred to concatenate on a String with += instead of using StringBuilder for better readability as the perf impact is very limited (very small number of query params added).

@ghost
Copy link

ghost commented Mar 6, 2016

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

@cyrille-leclerc cyrille-leclerc changed the title Fix #252: infinite loop because the "hypertext engine" may duplicate … Fix #252: infinite loop because the "hypertext engine" generates invalid URLs Mar 6, 2016
@jglick
Copy link
Contributor

jglick commented Mar 7, 2016

🐝

kohsuke added a commit that referenced this pull request Mar 12, 2016
Fix #252: infinite loop because the "hypertext engine" generates invalid URLs
@kohsuke kohsuke merged commit bba07c9 into hub4j:master Mar 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infinite loop in GHNotificationStream$1.fetch()
3 participants