Hi Tim, glad to hear! And thanks for your excellent feedback, which
helped a lot. I’ve incorporated the insights into the code, a
finalized version is available [1,2]. BaseX 9.6.5 will be released
this month. – Best, Christian

[1] https://files.basex.org/releases/latest/
[2] 
https://github.com/BaseXdb/basex/commit/b1ae50b13ba5912ad0bb7c149409f882cabeaf19



On Thu, Feb 3, 2022 at 3:04 AM Tim Thompson <timat...@gmail.com> wrote:
>
> That solved it! Thank you, Christian, for the outstanding support, as always. 
> I always panic a bit when I have to think about using something other than 
> BaseX for my programming needs ;)
>
> Tim
>
>
>
> On Wed, Feb 2, 2022 at 6:08 PM Christian Grün <christian.gr...@gmail.com> 
> wrote:
>>
>> Thanks.
>>
>> > The server is MarkLogic, s maybe they are biased against BaseX ;) I'm not 
>> > sure about the configuration, but replacing the User-Agent header with 
>> > "curl/7.71.1" didn't help.
>>
>> Fraudulent competition ;·)
>>
>> I’m particularly confused by the response code: 502 usually indicates
>> a server-side configuration error, which should not be triggerable
>> from a client.
>>
>> I noticed it would be more correct if BaseX had not sent a second
>> request if the response code is unequal to 401. In our case, it might
>> have proven to be helpful, as we can see that
>>
>> a) the response to the second request is 401, and
>> b) it contains the Digest WWW-Authenticate header.
>>
>> In addition, the second request contains a Content-Length header,
>> which is missing in the first request. Presumably, due to the missing
>> Content-Length:0 header, the server tries to retrieve a body, but
>> gives up after the timeout and returns 502.
>>
>> With the latest snapshot [1], I’m now creating an explicit
>> 0-bytes-body for all methods except for GET and TRACE. Does this help?
>>
>> > I noticed that in both curl and Postman the first request says, "[HTTP 
>> > request 1/2]," whereas BaseX says, "[HTTP request 1/1]"
>>
>> My hope is that numerous of these irregularities will disappear once
>> we’ll have switched to the new JDK 11 HTTP Client [2] with BaseX 10.
>>
>> [1] https://files.basex.org/releases/latest/
>> [2] https://openjdk.java.net/groups/net/httpclient/intro.html

Reply via email to