-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fixes asString when query has 1 param with no value #13
Conversation
When there was a key with no values in the query string, there was a implicit conversion from string to list that made the code compile but that messed up with the params. That way, this query string `?hello` would be translated into `?h&e&l&l&o`. Signed-off-by: Albert Pastrana <albert.pastrana@gmail.com>
@nathankleyn it would be great if you can take a look at this one :) |
1 similar comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One super quick thing, up to you if you want to fix as it works as it is. 👍
@@ -69,40 +68,41 @@ class URLSpec extends Specification with ScalaCheck with TestData { | |||
"path" >> { | |||
"should decode the rawPath correctly" >> { | |||
"when it has a space" >> { | |||
URL("http://example.com/hello%20world/").map(_.path) must beASuccessfulTry(Some("/hello world/")) | |||
URL("http://example.com/hello%20world/").map(_.path) must beASuccessfulTry(Option("/hello world/")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think both of these lines should still be Some
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because Intellij, if I leave it as Some
, then the line appears as a compilation error (even if it's not). So I have to either do what I did or leave as Some
and add the type like this: beASuccessfulTry[Option[String]](Some("/hello world/"))
.
Can't remember where I got the numbers for the exponential backoff test, but after several intermitent failures I just checked what the min and max values should be and they are slightly different from what I got. With these new values the test should never fail. Signed-off-by: Albert Pastrana <albert.pastrana@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #13 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 11 11
Lines 194 194
Branches 1 1
=====================================
Hits 194 194
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍 👏
When there was a key with no values in the query string,
there was a implicit conversion from string to list that
made the code compile but that messed up with the params.
That way, this query string
?hello
would be translatedinto
?h&e&l&l&o
.Signed-off-by: Albert Pastrana albert.pastrana@gmail.com