spring-projects/spring-framework — pull request #569 by boaz-jan (2014-06-27 10:06:58+00:00)
Title: Fixed [SPR-11897]

Please refer to [SPR-11897](https://jira.spring.io/browse/SPR-11897).

The gist of the bug is that in the case of posting "a=a;b=c" as a path variable when shouldRemoveSemicolonContent is false, the matrix parameters are evaluated as [a->a, b->c] and the path variable remains "a=a;b=c" whilst in the case of "aa;b=c" the matrix parameters are evaluated as [b->c] and the path variable is passed as "aa" thus leading to inconsistent and undocumented behavior when a '=' sign is present in the pre-matrix (before the first semicolon) part of the path.
This fix assumes that parsing the pre-matrix part of the path was a desired feature (due to lack of official comment on SPR-11897) but that the returned path variable should omit what spring parsed as matrix variables.

I've added several tests to validate this and fix other tests that expected it (for example: in case of having a path variable that it's first character is a semicolon, the test expected the entire value and not an empty string - I changed it to an empty string as all these values were parsed as matrix variables)

Commit message:
Fixed SPR-11897 in a way that does not harm the feature (?) of parsing key=value in
the pre-matrix part of the path as though it was a matrix variable
+ added test to validate that scenario