<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EpostStil17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NO-BOK" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB">Hello, I’m experiencing some warnings in GDAL 2.1 and error messages (HTTP 401) from the server.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">In I’m getting some unwanted results.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">I have stepped into </span><span lang="EN-GB" style="font-size:9.5pt;font-family:Consolas">CPLXMLNode *CPLParseXMLString( const char *pszString )</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Before the HTTP error, </span><span lang="EN-GB" style="font-size:9.5pt;font-family:Consolas">*pszString<span style="color:darkkhaki">,</span></span><span lang="EN-GB">  is this:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><gml_registry><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">    <!-- Finnish National Land Survey cadastral data --><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">    <namespace prefix="ktjkiiwfs" uri="http://xml.nls.fi/ktjkiiwfs/2010/02" useGlobalSRSName="true"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">        <featureType elementName="KiinteistorajanSijaintitiedot"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">                 schemaLocation="http://xml.nls.fi/XML/Schema/sovellus/ktjkii/modules/kiinteistotietojen_kyselypalvelu_WFS/Asiakasdokumentaatio/ktjkiiwfs/2010/02/KiinteistorajanSijaintitiedot.xsd"/><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">        <featureType elementName="PalstanTunnuspisteenSijaintitiedot"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">                 schemaLocation="http://xml.nls.fi/XML/Schema/sovellus/ktjkii/modules/kiinteistotietojen_kyselypalvelu_WFS/Asiakasdokumentaatio/ktjkiiwfs/2010/02/palstanTunnuspisteenSijaintitiedot.xsd"/><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">        </span><span lang="NO-NYN"><featureType elementName="RekisteriyksikonTietoja"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="NO-NYN">                 schemaLocation="http://xml.nls.fi/XML/Schema/sovellus/ktjkii/modules/kiinteistotietojen_kyselypalvelu_WFS/Asiakasdokumentaatio/ktjkiiwfs/2010/02/RekisteriyksikonTietoja.xsd"/><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="NO-NYN">        <featureType elementName="PalstanTietoja"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="NO-NYN">                 schemaLocation="http://xml.nls.fi/XML/Schema/sovellus/ktjkii/modules/kiinteistotietojen_kyselypalvelu_WFS/Asiakasdokumentaatio/ktjkiiwfs/2010/02/PalstanTietoja.xsd"/><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">    </namespace><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">…<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">    <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"></gml_registry><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">And the next call to the same function I get the error, and
</span><span lang="EN-GB" style="font-size:9.5pt;font-family:Consolas">*pszString<span style="color:darkkhaki">,</span></span><span lang="EN-GB">  is this:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><HTML><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><HEAD><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><TITLE>Error 401--Unauthorized</TITLE><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"></HEAD><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><BODY bgcolor="white"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><FONT FACE=Helvetica><BR CLEAR=all><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><TABLE border=0 cellspacing=5><TR><TD><BR CLEAR=all><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><FONT FACE="Helvetica" COLOR="black" SIZE="3"><H2>Error 401--Unauthorized</H2><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"></FONT></TD></TR><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"></TABLE><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><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><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"></FONT><FONT FACE="Helvetica" SIZE="3"><H4>10.4.2 401 Unauthorized</H4><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"></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><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"></FONT></TD></TR><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"></TABLE><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"></BODY><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"></HTML><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Could it be that the authentication parameter is not sendt in the response call to the server in between these two answers?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">I can see that there is a call to </span>
<span lang="EN-GB" style="font-size:9.5pt;font-family:Consolas">CPLHTTPResult *CPLHTTPFetch( const char *pszURL, char **papszOptions )</span><span lang="EN-GB"> , without any content in
</span><span lang="EN-GB" style="font-size:9.5pt;font-family:Consolas">**papszOptions.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">In other calls I can see that the UserPwd is sendt in the
</span><span lang="EN-GB" style="font-size:9.5pt;font-family:Consolas">**papszOptions variable.</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="color:black;mso-fareast-language:NO-BOK">Odd-Ragnar Lydersen</span></b><span style="mso-fareast-language:NO-BOK"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:black;mso-fareast-language:NO-BOK">System Developer</span><span style="mso-fareast-language:NO-BOK"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:8.0pt;color:black;mso-fareast-language:NO-BOK"> </span></b><span style="mso-fareast-language:NO-BOK"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;color:black;mso-fareast-language:NO-BOK">Email:
</span><span style="font-size:8.0pt;color:black;mso-fareast-language:NO-BOK"><a href="mailto:odd-ragnar.lydersen@powel.no"><span lang="EN-GB" style="color:blue">odd-ragnar.lydersen@powel.no</span></a></span><span style="font-size:8.0pt;color:black;mso-fareast-language:NO-BOK">
</span><span lang="EN-GB" style="mso-fareast-language:NO-BOK"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:NO-BOK"><a href="http://www.powel.com/" title="http://www.powel.com/"><span lang="EN-GB" style="font-size:8.0pt;color:blue">www.powel.no</span></a><o:p></o:p></span></p>
<p class="MsoNormal"><a href="http://www.powel.no/en"><span style="color:windowtext;mso-fareast-language:NO-BOK;text-decoration:none"><img border="0" width="89" height="26" style="width:.927in;height:.2708in" id="Picture_x0020_1" src="cid:image001.jpg@01D20F52.0848A840" alt="cid:image002.jpg@01CDD1F7.F470C190"></span></a><a href="https://www.facebook.com/pages/Powel/350917775700"><span style="color:windowtext;mso-fareast-language:NO-BOK;text-decoration:none"><img border="0" width="26" height="26" style="width:.2708in;height:.2708in" id="Picture_x0020_2" src="cid:image002.jpg@01D20F52.0848A840" alt="cid:image004.jpg@01CDD1F7.F470C190"></span></a><a href="http://www.linkedin.com/company/powel-as"><span style="color:windowtext;mso-fareast-language:NO-BOK;text-decoration:none"><img border="0" width="30" height="28" style="width:.3125in;height:.2916in" id="Picture_x0020_3" src="cid:image003.jpg@01D20F52.0848A840" alt="cid:image006.jpg@01CDD1F7.F470C190"></span></a><span style="mso-fareast-language:NO-BOK"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>