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

Global options variable is modified by args and can't be undone #27

Closed
jpallen opened this issue May 19, 2012 · 3 comments
Closed

Global options variable is modified by args and can't be undone #27

jpallen opened this issue May 19, 2012 · 3 comments
Assignees
Milestone

Comments

@jpallen
Copy link

jpallen commented May 19, 2012

Is there a good reason for appending the args into the global options variable? This means that if I pass an argument like { parent_rev : 'foo' } to a put request it gets injected into options variable. It is then always sent on subsequent requests, and this throws an error from the API since calls like get don't understand parent_rev.

If this is an accident rather than by design then I will put together a patch that stops this happening and makes each args local to its own request.

Regards,
James

@sintaxi
Copy link
Owner

sintaxi commented May 21, 2012

Indeed this is a bug. Thanks for reporting it. A patch would be welcomed.

@jpallen
Copy link
Author

jpallen commented May 21, 2012

Ok, I'll have a look into it further. I don't think there needs to be a global options variable at all. As far as I can tell the Dropbox API has no options which can be used on all API calls. So I think this should be done away with completely. Do you agree?

@plediii
Copy link
Contributor

plediii commented Jul 6, 2012

I was bitten by this issue as well. For instance if I send a cursor to client.delta, then every API request gets cursor as a parameter and dropbox replies with errors.

@ghost ghost assigned sintaxi Jul 9, 2012
@sintaxi sintaxi closed this as completed Jul 26, 2012
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

No branches or pull requests

3 participants