diff options
| author | Frederic Peters <fpeters@entrouvert.com> | 2004-08-14 13:44:18 +0000 |
|---|---|---|
| committer | Frederic Peters <fpeters@entrouvert.com> | 2004-08-14 13:44:18 +0000 |
| commit | b6aee731115594f98da80d2f48eb1c061a5232c0 (patch) | |
| tree | 344a84bc31f4dff12b44a0a439816322f752c142 | |
| parent | e045b3b5f977322ad2baae4881dc31832d2ceb31 (diff) | |
| download | lasso-b6aee731115594f98da80d2f48eb1c061a5232c0.tar.gz lasso-b6aee731115594f98da80d2f48eb1c061a5232c0.tar.xz lasso-b6aee731115594f98da80d2f48eb1c061a5232c0.zip | |
lasso_provider_get_assertionConsumerServiceURL now returns a glib-allocated
string (instead of libxml2-allocated) since it was already declared to return
gchar*. Moreover it strips the returned string so that is is possible to have
some spacings in the metadata file.
<AssertionConsumerServiceURL id="AssertionConsumerServiceURL1" isDefault="true">
https://service-provider:2003/liberty-alliance/liberty-alliance/assertionConsumer
</AssertionConsumerServiceURL>
won't no more cause a redirect to Location:\n https://...
| -rw-r--r-- | lasso/Attic/protocols/provider.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lasso/Attic/protocols/provider.c b/lasso/Attic/protocols/provider.c index b0d6cf9c..edd2d714 100644 --- a/lasso/Attic/protocols/provider.c +++ b/lasso/Attic/protocols/provider.c @@ -96,9 +96,10 @@ lasso_provider_get_metadata_value(LassoProvider *provider, gchar *name, GError **err) { - xmlChar *value; + xmlChar *content; LassoNode *descriptor; GError *tmp_err = NULL; + gchar *result = NULL; if (err != NULL && *err != NULL) { g_set_error(err, g_quark_from_string("Lasso"), @@ -134,15 +135,17 @@ lasso_provider_get_metadata_value(LassoProvider *provider, return (NULL); } - value = lasso_node_get_child_content(descriptor, name, NULL, - &tmp_err); + content = lasso_node_get_child_content(descriptor, name, NULL, &tmp_err); lasso_node_destroy(descriptor); - if (value == NULL) { + if (content == NULL) { g_propagate_error (err, tmp_err); + } else { + result = g_strdup(g_strstrip(content)); + xmlFree(content); } - return (value); + return (result); } gchar * |
