Skip to content

Commit

Permalink
Don't entity-encode URLs used on attributes: libxml2 does this for us…
Browse files Browse the repository at this point in the history
…. Refs #4622
  • Loading branch information
ejn authored and tbonfort committed Apr 8, 2013
1 parent 6e9dec9 commit 599ab61
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions mapwfs11.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ int msWFSGetCapabilities11(mapObj *map, wfsParamsObj *params,
const char *user_namespace_uri = NULL;
gmlNamespaceListObj *namespaceList=NULL; /* for external application schema support */

char *script_url=NULL, *script_url_encoded=NULL, *formats_list;
char *script_url=NULL, *formats_list;
const char *value = NULL;
const char *encoding;

Expand Down Expand Up @@ -366,8 +366,7 @@ int msWFSGetCapabilities11(mapObj *map, wfsParamsObj *params,
psNsOws, psNsXLink, map, "FO"));

/*operation metadata */
if ((script_url=msOWSGetOnlineResource(map, "FO", "onlineresource", req)) == NULL
|| (script_url_encoded = msEncodeHTMLEntities(script_url)) == NULL) {
if ((script_url=msOWSGetOnlineResource(map, "FO", "onlineresource", req)) == NULL) {
msSetError(MS_WFSERR, "Server URL not found", "msWFSGetCapabilities11()");
return msWFSException11(map, "mapserv", "NoApplicableCode", params->pszVersion);
}
Expand All @@ -382,7 +381,7 @@ int msWFSGetCapabilities11(mapObj *map, wfsParamsObj *params,
/* -------------------------------------------------------------------- */
psNode = xmlAddChild(psMainNode,
msOWSCommonOperationsMetadataOperation(psNsOws,psNsXLink,"GetCapabilities",
OWS_METHOD_GETPOST, script_url_encoded));
OWS_METHOD_GETPOST, script_url));

xmlAddChild(psMainNode, psNode);
xmlAddChild(psNode, msOWSCommonOperationsMetadataDomainType(
Expand All @@ -403,7 +402,7 @@ int msWFSGetCapabilities11(mapObj *map, wfsParamsObj *params,
if (msOWSRequestIsEnabled(map, NULL, "F", "DescribeFeatureType", MS_TRUE)) {
psNode = xmlAddChild(psMainNode,
msOWSCommonOperationsMetadataOperation(psNsOws,psNsXLink,"DescribeFeatureType",
OWS_METHOD_GETPOST, script_url_encoded));
OWS_METHOD_GETPOST, script_url));
xmlAddChild(psMainNode, psNode);

/*output format*/
Expand All @@ -419,7 +418,7 @@ int msWFSGetCapabilities11(mapObj *map, wfsParamsObj *params,

psNode = xmlAddChild(psMainNode,
msOWSCommonOperationsMetadataOperation(psNsOws,psNsXLink,"GetFeature",
OWS_METHOD_GETPOST, script_url_encoded));
OWS_METHOD_GETPOST, script_url));
xmlAddChild(psMainNode, psNode);

xmlAddChild(psNode, msOWSCommonOperationsMetadataDomainType(ows_version, psNsOws,
Expand Down Expand Up @@ -497,7 +496,6 @@ int msWFSGetCapabilities11(mapObj *map, wfsParamsObj *params,
xmlFreeNs(psNsOgc);

free(script_url);
free(script_url_encoded);
free(xsi_schemaLocation);
free(schemalocation);

Expand Down

0 comments on commit 599ab61

Please sign in to comment.