Menu

#2743 Disable automatic Expect header in wbemcli

Function
pending
wbemcli
5
2015-08-03
2015-03-03
jesslacy
No

Wbemcli "get instance" commands fail in wbemcli v1.6.3 when a server is unable to handle the "Expect" header and returns an http status of 417. This header appears to be automatically added by the curl_easy_perform request.

See patch for suggested fix.

Sample of the output with CURLDEBUG on:
Content-Length: 1058
Expect: 100-continue

  • The requested URL returned error: 417
  • Closing connection #0
  • HTTP response code said error
    *
  • wbemcli: Http Exception: HTTP response code said error
    *
1 Attachments

Related

Bugs: #2743

Discussion

  • Dave Heller

    Dave Heller - 2015-03-08
    • assigned_to: Dave Heller
     
  • Dave Heller

    Dave Heller - 2015-03-09

    I guess this is something that varies with different versions of curl. On the systems I'm running currently (mostly recent fedoras) libcurl does not send the header by default and will only send it if I add -e100. But I see when I coded a similar patch for SFCB [sfcb-tix:#101] I did have system that sent the header by default, and now I don't remember what OS or version of libcurl that was.

    Anyway, I'm OK with adding the patch but I'm curious what OS and version of libcurl you are running. I'm also curious to know which server returns a 417 when receiving the Expect header.

     

    Related

    SFCB: #101

  • jesslacy

    jesslacy - 2015-03-09

    Thanks, Dave.

    I'm seeing this on Ubuntu 14.04 for curl version 7.35:
    curl 7.35.0 (i686-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
    Also observed on a legacy system running Ubuntu 10.04 with curl 7.19.

    The get-instance command is running against an version 3.11 of sfcb.

     
  • Dave Heller

    Dave Heller - 2015-04-15

    Thanks! I forget that [sfcb-tix:#12] was never backported to SFCB 1.3, and it will fail when receiving a Expect header, without that patch.

    FWIW, I did a test on Ubuntu 15.04 (pre-release) with curl 7.38, and it did not send Expect-100 by default. Still, there are obviously some cases where it does. I hit one previously when working on [sfcb-tix:#101]. Now I don't remember which curl version that was.

    Not sure why I didn't catch this with I added the -e100 feature to wbemcli. I guess it wasn't happening during those tests, and it slipped my mind.

    In any case... not a bad idea to ensure the default is off, so checking in your patch.

     

    Related

    SFCB: #101

  • Dave Heller

    Dave Heller - 2015-04-15
    • status: open --> pending
     
  • nickcheng

    nickcheng - 2015-08-03

    Hi Dave,
    I update wbemcli-1.6.3 with your patch, but still got the error message, " wbemci: Http Exception: HTTP response code said error".
    The host is CentOS 6.3, curl is 7.19.7-40.el6.
    Do you have solution so far?
    Thanks for your effort,

     
    • jesslacy

      jesslacy - 2015-08-03

      Did you also compile with the patch from http://sourceforge.net/p/sblim/bugs/2742/ ? I had to apply both to for my OpenSUSE and Ubuntu hosts.

       
    • jesslacy

      jesslacy - 2015-08-03

      Did you also compile with the patch from
      http://sourceforge.net/p/sblim/bugs/2742/ ? I had to apply both to for my
      OpenSUSE and Ubuntu hosts.

      On Mon, Aug 3, 2015 at 4:40 AM, nickcheng nickchengster@users.sf.net
      wrote:

      Hi Dave,
      I update wbemcli-1.6.3 with your patch, but still got the error message, "
      wbemci: Http Exception: HTTP response code said error".
      The host is CentOS 6.3, curl is 7.19.7-40.el6.
      Do you have solution so far?
      Thanks for your effort,


      Status: pending
      Group: Function
      Labels: http header curl curl_easy_perform
      Created: Tue Mar 03, 2015 11:53 PM UTC by jesslacy
      Last Updated: Wed Apr 15, 2015 12:04 AM UTC
      Owner: Dave Heller
      Attachments:

      Wbemcli "get instance" commands fail in wbemcli v1.6.3 when a server is
      unable to handle the "Expect" header and returns an http status of 417.
      This header appears to be automatically added by the curl_easy_perform
      request.

      See patch for suggested fix.

      Sample of the output with CURLDEBUG on:
      Content-Length: 1058
      Expect: 100-continue

      • The requested URL returned error: 417
      • Closing connection #0
      • HTTP response code said error
        *
      • wbemcli: Http Exception: HTTP response code said error
        *

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/sblim/bugs/2743/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #2743


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.