Fix low long rewriting parameter for char superior at 255.
This commit is contained in:
parent
762c758e4e
commit
57ea6a3c46
1 changed files with 17 additions and 5 deletions
|
@ -672,13 +672,25 @@ public class SimpleServletDispatcher extends HttpServlet
|
||||||
{
|
{
|
||||||
// logger.info("" + charIndex + " " + parameter.charAt(charIndex) +
|
// logger.info("" + charIndex + " " + parameter.charAt(charIndex) +
|
||||||
// " " + (char) tab[parameter.charAt(charIndex)]);
|
// " " + (char) tab[parameter.charAt(charIndex)]);
|
||||||
char car = (char) rewritingParameterMapping[parameter.charAt(charIndex)];
|
|
||||||
if (car != NONE)
|
char sourceCar = parameter.charAt(charIndex);
|
||||||
|
|
||||||
|
char targetCar;
|
||||||
|
if (sourceCar > 255)
|
||||||
{
|
{
|
||||||
if ((car != '-') || ((car == '-') && (previousCar != '-')))
|
targetCar = '-';
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
buffer.append(car);
|
targetCar = (char) rewritingParameterMapping[sourceCar];
|
||||||
previousCar = car;
|
}
|
||||||
|
|
||||||
|
if (targetCar != NONE)
|
||||||
|
{
|
||||||
|
if ((targetCar != '-') || ((targetCar == '-') && (previousCar != '-')))
|
||||||
|
{
|
||||||
|
buffer.append(targetCar);
|
||||||
|
previousCar = targetCar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue