2018-11-21 05:37 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0005473libmicrohttpdbuild systempublic2018-11-18 13:27
Reportereworm 
Assigned ToChristian Grothoff 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Platformx86_64OSArch LinuxOS Versionrolling
Product Version0.9.60 
Target Version0.9.61Fixed in Version0.9.61 
Summary0005473: make check fails
DescriptionBuild succeeds, but make check fails:

===========================================================
   GNU Libmicrohttpd 0.9.60: src/testcurl/test-suite.log
===========================================================

# TOTAL: 36
# PASS: 34
# SKIP: 0
# XFAIL: 0
# FAIL: 2
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: test_digestauth
=====================

Authentication failed, arguments do not match.
curl_easy_perform failed: `HTTP response code said error'
Error (code: 2)
FAIL test_digestauth (exit status: 1)

FAIL: test_digestauth_with_arguments
====================================

Authentication failed, arguments do not match.
curl_easy_perform failed: `HTTP response code said error'
Error (code: 2)
FAIL test_digestauth_with_arguments (exit status: 1)
Steps To Reproduce./configure && make && make check
Additional InformationI do not think so, but if it matters: This is with curl 7.62.0-1.
TagsNo tags attached.
Attached Files
  • patch file icon 0001-fix-tests-with-curl.patch (2,168 bytes) 2018-11-08 00:25 -
    From 7ae5cf2b850a9fcdc5628a09c75a250f8bd6f293 Mon Sep 17 00:00:00 2001
    From: Christian Hesse <mail@eworm.de>
    Date: Thu, 8 Nov 2018 00:15:29 +0100
    Subject: [PATCH 1/1] fix tests with curl
    
    Starting with curl 7.62.0 some tests fail. The commit in question is
    46e16406 [0] ("url: use the URL API internally as well").
    
    Analyzing the changed behavior reveals that the url given to
    curl_easy_setopt() with CURLOPT_URL is no longer encoded. Looking at the
    documentation [1] this behavior is correct, the "parameter should be a
    char * to a zero terminated string which must be URL-encoded [...]".
    
    So let's just give a valid url...
    
    [0] https://github.com/curl/curl/commit/46e164069d1a5230e4e64cbd2ff46c46cce056bb
    [1] https://curl.haxx.se/libcurl/c/CURLOPT_URL.html
    
    Signed-off-by: Christian Hesse <mail@eworm.de>
    ---
     src/testcurl/test_digestauth.c                | 2 +-
     src/testcurl/test_digestauth_with_arguments.c | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c
    index 48c7a87a..89076608 100644
    --- a/src/testcurl/test_digestauth.c
    +++ b/src/testcurl/test_digestauth.c
    @@ -218,7 +218,7 @@ testDigestAuth ()
             { MHD_stop_daemon (d); return 32; }
           port = (int)dinfo->port;
         }
    -  sprintf(url, "http://127.0.0.1:%d/bar%%20 foo?a=bü%%20", port);
    +  sprintf(url, "http://127.0.0.1:%d/bar%20foo%3Fkey%3Dvalue", port);
       c = curl_easy_init ();
       curl_easy_setopt (c, CURLOPT_URL, url);
       curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
    diff --git a/src/testcurl/test_digestauth_with_arguments.c b/src/testcurl/test_digestauth_with_arguments.c
    index 107d2256..17d0f7a2 100644
    --- a/src/testcurl/test_digestauth_with_arguments.c
    +++ b/src/testcurl/test_digestauth_with_arguments.c
    @@ -213,7 +213,7 @@ testDigestAuth ()
             { MHD_stop_daemon (d); return 32; }
           port = (int)dinfo->port;
         }
    -  sprintf(url, "http://127.0.0.1:%d/foo?key=value", port);
    +  sprintf(url, "http://127.0.0.1:%d/bar%20foo%3Fkey%3Dvalue", port);
       c = curl_easy_init ();
       curl_easy_setopt (c, CURLOPT_URL, url);
       curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
    
    patch file icon 0001-fix-tests-with-curl.patch (2,168 bytes) 2018-11-08 00:25 +

-Relationships Relation Graph ] Dependency Graph ]
+Relationships

-Notes

~0013322

eworm (reporter)

Whatever causes this... I can reproduce with 0.9.59 as well.

Looks like I have to reconsider my statement about curl.

BTW, it fails at src/microhttpd/digestauth.c line 694 checking for the number of headers.

~0013323

eworm (reporter)

The offending commit is:
https://github.com/curl/curl/commit/46e164069d1a5230e4e64cbd2ff46c46cce056bb

Sadly this is quite invasive... :-/

~0013324

eworm (reporter)

The behavior in curl changed, but libmicrohttpd did misuse libcurl before... The patch has the details.

~0013330

beberking (developer)

For your information, also happens on Debian. And with libmicrohttpd 0.9.59 (which used to build and pass all tests), the same errors occur.

~0013333

Christian Grothoff (manager)

Fixed as suggested in 2962b6e4..ff551c46
+Notes

-Issue History
Date Modified Username Field Change
2018-11-06 22:49 eworm New Issue
2018-11-07 22:32 eworm Note Added: 0013322
2018-11-07 22:53 eworm Note Added: 0013323
2018-11-08 00:25 eworm File Added: 0001-fix-tests-with-curl.patch
2018-11-08 00:25 eworm Note Added: 0013324
2018-11-11 15:35 beberking Note Added: 0013330
2018-11-12 19:49 Christian Grothoff Assigned To => Christian Grothoff
2018-11-12 19:49 Christian Grothoff Status new => assigned
2018-11-12 19:49 Christian Grothoff Target Version => 0.9.61
2018-11-12 19:53 Christian Grothoff Note Added: 0013333
2018-11-12 19:53 Christian Grothoff Status assigned => resolved
2018-11-12 19:53 Christian Grothoff Resolution open => fixed
2018-11-12 19:53 Christian Grothoff Fixed in Version => 0.9.61
2018-11-18 13:27 Christian Grothoff Status resolved => closed
+Issue History