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

(#4313) - fix options usage within http adapter #4313

Closed
wants to merge 1 commit into from

Conversation

omsmith
Copy link
Contributor

@omsmith omsmith commented Sep 11, 2015

@daleharvey noticed some oddities in the diff from 3c964ad

1st commit: getHost no longer uses opts. So in particular, we definitely dont need to clone them. Still passes opts to getHostFn in case the passed in implementation uses it.

2nd commit: after the change, the input opts.ajax is being modified within the if (opts.auth || host.auth) so this just moves the clone earlier

Can fix-up commit messages / add regression test for the second case, but was able to just do this quick to get it in front of you

@daleharvey
Copy link
Member

This looks sensible, thanks for catching, will see what CI says now

@@ -63,7 +63,7 @@ function preprocessAttachments(doc) {

// Get all the information you possibly can about the URI given by name and
// return it as a suitable object.
function getHost(name, opts) {
function getHost(name/*, opts*/) {
Copy link
Member

Choose a reason for hiding this comment

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

Should get rid of this

@daleharvey
Copy link
Member

Awesome green run :) not sure whats up with the allowed failures but its probably nothing, restarted.

If you want to address the nit and squash these up with the right commit message, I dont think tests are absolutely required for this change, but I am mostly not committing already in case you do want to add them.

* remove unneeded usage of opts within getHost
* don't mutate input ajax options
@omsmith omsmith changed the title Http opts cleanup (#4313) - fix options usage within http adapter Sep 12, 2015
@omsmith
Copy link
Contributor Author

omsmith commented Sep 12, 2015

removed the commented param, squashed, and reworded

daleharvey pushed a commit that referenced this pull request Sep 13, 2015
* remove unneeded usage of opts within getHost
* don't mutate input ajax options
@daleharvey
Copy link
Member

Awesome, thanks - d9e9726

@daleharvey daleharvey closed this Sep 13, 2015
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.

None yet

2 participants