#2706 closed defect (invalid)

FIX - WCPS with "%" operator returns error in decoding URL

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 10.2
Component: petascope Version: 10.2
Keywords: Cc: Dimitar Misev, Vlad Merticariu
Complexity: Medium

Description

e.g.

 curl 'http://localhost:8080/rasdaman/ows' -d 'query=for c in (test_mr) return 1 % 3'
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ows:ExceptionReport version="2.1.0"
    xsi:schemaLocation="http://www.opengis.net/ows/2.0 http://schemas.opengis.net/ows/2.0/owsExceptionReport.xsd"
    xmlns:ows="http://www.opengis.net/ows/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
    <ows:Exception exceptionCode="InternalComponentError" >
        <ows:ExceptionText>URLDecoder: Illegal hex characters in escape (%) pattern - For input string: " 3"</ows:ExceptionText>
    </ows:Exception>
</ows:ExceptionReport>

Change History (1)

comment:1 by Bang Pham Huu, 14 months ago

Resolution: invalid
Status: assignedclosed

In WCPS, % character is used for decoding UTF-8 encoded characters, for example, character [ is encoded as %5B.

In order to perform a modulor operation, one needs to use binary function mod(a, b). For example:

    for $c in (test_mr)
    return encode( mod(5, 3) , "csv" )
Note: See TracTickets for help on using tickets.