Skip to content

[WIP] fix issue #37 #38

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

Closed
wants to merge 2 commits into from
Closed

[WIP] fix issue #37 #38

wants to merge 2 commits into from

Conversation

quetzyg
Copy link

@quetzyg quetzyg commented Aug 12, 2016

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets fixes #37
Documentation N/A
License MIT

What's in this PR?

The changes in this PR, allow the RedirectPlugin to properly track requests using full URLs instead of comparing only the URI.

Checklist

  • Updated CHANGELOG.md to describe BC breaks / deprecations | new feature | bugfix

To Do

  • Fix tests

@dbu
Copy link
Contributor

dbu commented Aug 12, 2016

__toString is indeed not allowed to throw an exception - its unfortunate we don't see the stack trace.

is the test using a mock for UriInterface? could we use a real instance of Uri for the test instead?

@quetzyg
Copy link
Author

quetzyg commented Aug 12, 2016

I tried running with -vvv:

vendor/bin/phpspec -vvv spec/Plugin/RedirectPluginSpec.php

but there was no change in the output I got.

@sagikazarmark
Copy link
Member

I think the problem is that __toString is not expected to be called on the URI object. So far we used getRequestTarget:

https://github.com/php-http/client-common/blob/master/spec/Plugin/RedirectPluginSpec.php#L47

@dbu
Copy link
Contributor

dbu commented Aug 13, 2016 via email

@sagikazarmark
Copy link
Member

Yes, but not in this PR. I would rather fix the tests by altering the spec expectations and rewrite the tests afterwards.

@sagikazarmark
Copy link
Member

I would be happier if we could solve the promise/exception thing first.

@sagikazarmark
Copy link
Member

@quetzyg can you please check my recommended fix?

@quetzyg
Copy link
Author

quetzyg commented Aug 25, 2016

Hi @sagikazarmark,

I'll try to find some time to make the changes to the spec expectations.

@joelwurtz
Copy link
Member

I've fixed test and add a specific one for the one mentioned in the issue under #43

@dbu
Copy link
Contributor

dbu commented Aug 31, 2016

continued in #43. thanks @quetzyg for your contribution!

@dbu dbu closed this Aug 31, 2016
@quetzyg
Copy link
Author

quetzyg commented Aug 31, 2016

Soz @dbu, I've been swamped and I haven't had time to check phpSpec properly to update the tests.
Glad @joelwurtz stepped up.

Keep up the good work guys!

@quetzyg quetzyg deleted the fix/issue-37 branch August 31, 2016 18:26
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.

Redirect Plugin - Circular redirection detected
4 participants