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 MapServer#4622
  • Loading branch information
ejn committed Apr 5, 2013
1 parent 72b663f commit 36cb497
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions mapwfs11.c
Expand Up @@ -265,7 +265,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 @@ -365,8 +365,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 @@ -381,7 +380,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 @@ -402,7 +401,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 @@ -418,7 +417,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 @@ -496,7 +495,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 36cb497

Please sign in to comment.