Hello, I'm experiencing some warnings in GDAL 2.1 and error messages (HTTP 401) 
from the server.

In I'm getting some unwanted results.
However I am able to read features from the server, but I wonder why these 
errors occur, and if I'm not getting all the information I should have gotten 
if this error did not occur.

I have stepped into CPLXMLNode *CPLParseXMLString( const char *pszString )
Before the HTTP error, *pszString,  is this:

<gml_registry>
    <!-- Finnish National Land Survey cadastral data -->
    <namespace prefix="ktjkiiwfs" uri="http://xml.nls.fi/ktjkiiwfs/2010/02"; 
useGlobalSRSName="true">
        <featureType elementName="KiinteistorajanSijaintitiedot"
                 
schemaLocation="http://xml.nls.fi/XML/Schema/sovellus/ktjkii/modules/kiinteistotietojen_kyselypalvelu_WFS/Asiakasdokumentaatio/ktjkiiwfs/2010/02/KiinteistorajanSijaintitiedot.xsd"/>
        <featureType elementName="PalstanTunnuspisteenSijaintitiedot"
                 
schemaLocation="http://xml.nls.fi/XML/Schema/sovellus/ktjkii/modules/kiinteistotietojen_kyselypalvelu_WFS/Asiakasdokumentaatio/ktjkiiwfs/2010/02/palstanTunnuspisteenSijaintitiedot.xsd"/>
        <featureType elementName="RekisteriyksikonTietoja"
                 
schemaLocation="http://xml.nls.fi/XML/Schema/sovellus/ktjkii/modules/kiinteistotietojen_kyselypalvelu_WFS/Asiakasdokumentaatio/ktjkiiwfs/2010/02/RekisteriyksikonTietoja.xsd"/>
        <featureType elementName="PalstanTietoja"
                 
schemaLocation="http://xml.nls.fi/XML/Schema/sovellus/ktjkii/modules/kiinteistotietojen_kyselypalvelu_WFS/Asiakasdokumentaatio/ktjkiiwfs/2010/02/PalstanTietoja.xsd"/>
    </namespace>

...

</gml_registry>

And the next call to the same function I get the error, and *pszString,  is 
this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN">
<HTML>
<HEAD>
<TITLE>Error 401--Unauthorized</TITLE>
</HEAD>
<BODY bgcolor="white">
<FONT FACE=Helvetica><BR CLEAR=all>
<TABLE border=0 cellspacing=5><TR><TD><BR CLEAR=all>
<FONT FACE="Helvetica" COLOR="black" SIZE="3"><H2>Error 401--Unauthorized</H2>
</FONT></TD></TR>
</TABLE>
<TABLE border=0 width=100% cellpadding=10><TR><TD VALIGN=top WIDTH=100% 
BGCOLOR=white><FONT FACE="Courier New"><FONT FACE="Helvetica" SIZE="3"><H3>From 
RFC 2068 <i>Hypertext Transfer Protocol -- HTTP/1.1</i>:</H3>
</FONT><FONT FACE="Helvetica" SIZE="3"><H4>10.4.2 401 Unauthorized</H4>
</FONT><P><FONT FACE="Courier New">The request requires user authentication. 
The response MUST include a WWW-Authenticate header field (section 14.46) 
containing a challenge applicable to the requested resource. The client MAY 
repeat the request with a suitable Authorization header field (section 14.8). 
If the request already included Authorization credentials, then the 401 
response indicates that authorization has been refused for those credentials. 
If the 401 response contains the same challenge as the prior response, and the 
user agent has already attempted authentication at least once, then the user 
SHOULD be presented the entity that was given in the response, since that 
entity MAY include relevant diagnostic information. HTTP access authentication 
is explained in section 11.</FONT></P>
</FONT></TD></TR>
</TABLE>

</BODY>
</HTML>

Could it be that the authentication parameter is not sendt in the response call 
to the server in between these two answers?
I can see that there is a call to CPLHTTPResult *CPLHTTPFetch( const char 
*pszURL, char **papszOptions ) , without any content in **papszOptions.
In other calls I can see that the UserPwd is sendt in the **papszOptions 
variable.

Odd-Ragnar Lydersen
System Developer

Email: odd-ragnar.lyder...@powel.no<mailto:odd-ragnar.lyder...@powel.no>
www.powel.no<http://www.powel.com/>
[cid:image002.jpg@01CDD1F7.F470C190]<http://www.powel.no/en>[cid:image004.jpg@01CDD1F7.F470C190]<https://www.facebook.com/pages/Powel/350917775700>[cid:image006.jpg@01CDD1F7.F470C190]<http://www.linkedin.com/company/powel-as>

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to