Opened 11 years ago
Closed 10 years ago
#555 closed defect (fixed)
SECORE to encode predefined entities in responses
Reported by: | Piero Campalani | Owned by: | Piero Campalani |
---|---|---|---|
Priority: | major | Milestone: | 9.0.x |
Component: | secore | Version: | development |
Keywords: | url encode xml | Cc: | Dimitar Misev |
Complexity: | Easy |
Description
Web browsers, which beautify and validate XML content, do not show SECORE responses when the URLs in the body are not well-formed.
Example:
%SECURE_URL%/def/crs?authority=OGC&version=0
Returns:
<?xml version="1.0" encoding="ISO-8859-1"?> <identifiers at='/crs?authority=OGC&version=0' xmlns='http://www.opengis.net/crs-nts/1.0' > <identifier>/crs/OGC/0/.AnsiDate-template</identifier> <identifier>/crs/OGC/0/.Index1D-template</identifier> <identifier>/crs/OGC/0/.Index2D-template</identifier> <identifier>/crs/OGC/0/.Index3D-template</identifier> <identifier>/crs/OGC/0/.Temporal-template</identifier> <identifier>/crs/OGC/0/AnsiDate</identifier> <identifier>/crs/OGC/0/Index1D</identifier> <identifier>/crs/OGC/0/Index2D</identifier> <identifier>/crs/OGC/0/Index3D</identifier> <identifier>/crs/OGC/0/Temporal</identifier> </identifiers>
Browser:
XML Parsing Error: not well-formed Location: http://localhost:8090/def/crs?authority=OGC&version=0 Line Number 2, Column 69: <identifiers at='http://localhost:8090/def/crs?authority=OGC&version=0' xmlns='http://www.opengis.net/crs-nts/1.0' xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd"> --------------------------------------------------------------------^
Solution:
- —- <identifiers at='/crs?authority=OGC&version=0' xmlns='http://www.opengis.net/crs-nts/1.0' >
- +++ <identifiers at='/crs?authority=OGC&version=0' xmlns='http://www.opengis.net/crs-nts/1.0' >
Note: the Petascope utility escapeXmlPredefinedEntities()
in petascope.util.StringUtil
could be used.
Change History (2)
comment:1 by , 10 years ago
Status: | new → accepted |
---|
comment:2 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Note:
See TracTickets
for help on using tickets.
changeset:2a0f34d08f5536c1cbb24aa5d14f392e8a99e90c