Opened 4 years ago

Closed 3 years ago

#555 closed defect (fixed)

SECORE to encode predefined entities in responses

Reported by: pcampalani Owned by: pcampalani
Priority: major Milestone: 9.0.x
Component: secore Version: development
Keywords: url encode xml Cc: dmisev
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:

Note: the Petascope utility escapeXmlPredefinedEntities() in petascope.util.StringUtil could be used.

Change History (2)

comment:1 Changed 3 years ago by pcampalani

  • Status changed from new to accepted

comment:2 Changed 3 years ago by dmisev

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.