-
Notifications
You must be signed in to change notification settings - Fork 48
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
URI 5.19 breaks Catalyst-Controller-DBIC-API #133
Comments
It also seems that t/13_req.t in https://metacpan.org/release/YTURTLE/Net-Azure-EventHubs-0.09 also started to fail because of this change. See http://matrix.cpantesters.org/?dist=Net-Azure-EventHubs%200.09 |
Web-Request-0.11 seems to fail with URI >= 5.19, so possibly the same problem. |
This commit looks likely: 9ee8098 The new code looks more correct to me though, IMHO. |
rfc3986 does not tell much about the format of query strings. It mentions that it can include key=value pairs, but even does not tell what separator characters ( |
I think the closest we have is https://url.spec.whatwg.org/#application/x-www-form-urlencoded, which seeks to obsolete parts of RFC3986. It speaks only of "null byte sequences", which could be interpreted as either |
+1 for treating
However I learned now that "foo" should be treated the same as "foo=" when parsing x-www-form-urlencoded content, so there's an additional problem in some parsing code... |
For example, CGI.pm may do strange things if the equals sign is missing:
But if there's another parameter, then it looks sane again:
|
I have been following this conversation a bit, and too be honest, it gets me slightly worried. Surely, in the old age off HTTP 1.0, and HTML 3.5 and JavaScript 1.2 when I joined the band, those POST request with But nowadays, we have api-clients that are talking to api-back-ends and potentially need to be able to send Whatever the code would do downstream is up to the application developer. But it does worry, that we might indeed break downstream code. If we do, we might be better off rolling back or prevent breakage... for now. And suggest to see what else is breaking – I think our amazing smoke-testers already do an amazing job – and work with the downstream developers to prepare a fix that will work the moment we say that Oh... and happy new-year :-) |
How we proceed in fixing this? |
It should be trivial to update Catalyst-Controller-DBIC-API to fix its tests to account for this change. |
As the change in URI affects other dists too I was hoping it is reverted here. |
I've changed the test to pass an empty string instead of undef so the same URI as before is generated and tested. |
A few data points: CGI.pm:
HTTP::Body (used by Catalyst):
URL::Encode:
WWW::Form::UrlEncoded:
URI 5.18:
URI 5.19+:
Based on the URL spec, decoding a parameter without an equals sign should give a value of an empty string. An "empty byte sequence" is an empty string. It is also used to describe a value decoded from As for encoding, the spec says "Assert: tuple’s name and tuple’s value are scalar value strings". So encoding anything other than a string is undefined behavior. Based on this, I would say that the new URI behavior for encoding is also wrong. HTTP::Body also apparently has a bug related to this. |
Mojolicious:
|
The problem is described in https://rt.cpan.org/Ticket/Display.html?id=150855
It seems that a change in URI.pm is causing the problem. Before (until URI 5.18):
After (with URI 5.19):
Note the mising equals sign.
The text was updated successfully, but these errors were encountered: