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

Tweaks to your nice JS client for aria2 #73

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

buffovich
Copy link

Hello,

Actually, all explanations can be found in commit messages. I realize that some of these changes can be refused at the very first time. But everything can be discussed and I'm ready to re-work some of my changes.

Looking forward to hearing back.

PS.
I'm server guy and newbie in JS.

Add option for the deployments where web server acts as a reverse proxy for aria2 RPC interface.
The reason is simple - I don't need any localhost/standalone support. Probably, it's not my best commit.
Uploading torrent file via GET request makes default Apache unhappy as well as aria2 RPC module itself. You can make them crying with some torrent file. POST fits the role better.
Got in trouble with aria2 and JSONP call transmitted via POST. Trying JSON call type.
aria2 accepts only JSON block in POST body. Giving that block.
@ziahamza
Copy link
Owner

ziahamza commented Jan 9, 2014

sorry for the late reply. Frankly been quite busy with a lot of stuff :S Anyhow, here are my comments:

People still use standalone rpc support, maybe removing it may not be a good idea. I like adding another configuration for reverse proxy cases.
And making rpc calls to POST may not work in cross domain cases, like talking over localhost, maybe not a good idea to change it completely either.

@buffovich
Copy link
Author

Thank you for your reply. Processing... :-)

2014/1/9 hamza zia [email protected]

sorry for the late reply. Frankly been quite busy with a lot of stuff :S
Anyhow, here are my comments:

People still use standalone rpc support, maybe removing it may not be a
good idea. I like adding another configuration for reverse proxy cases.
And making rpc calls to POST may not work in cross domain cases, like
talking over localhost, maybe not a good idea to change it completely
either.


Reply to this email directly or view it on GitHubhttps://github.com//pull/73#issuecomment-31925394
.

@no1xsyzy
Copy link
Contributor

no1xsyzy commented Nov 29, 2017

Yes, aria2 supports post request for RPC calls:

The implemented JSON-RPC is based on JSON-RPC 2.0 http://jsonrpc.org/specification, and supports HTTP POST and GET (JSONP).

from https://aria2.github.io/manual/en/html/aria2c.html#rpc-interface
What's more, no problem with cross domain. (Have used once in userscripts - and forgot to use (or say just hadn't known) the API greasemonkey provided to pass cross domain problems)
Hope that helps

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.

3 participants