Menu

#54 Expect: 100-continue header results in 417 Error with proxy

SyncEvolution
open-fixed
7
2009-01-06
2008-09-08
No

Our ISP Melsa Net proxy rejects HTTP POST request by SyncEvolution that contains "Expect: 100-continue" by returning 417 Expectation Failed.

Please remove this "Expect" header.

See for more info:
http://curl.haxx.se/mail/archive-2005-11/0129.html

Discussion

  • Patrick Ohly

    Patrick Ohly - 2008-09-09

    That'll have to be be changed in the client library. I can bring it up and provide a patch, but Funambol is currently migrating their source code to SVN. It'll be a while before I can release an update (perhaps a month from now).

     
  • Hendy Irawan

    Hendy Irawan - 2008-09-09

    Okey... let me know if I can help.

     
  • Hendy Irawan

    Hendy Irawan - 2008-09-12

    Information:

    Ubuntu 8.04.1
    Evolution 2.22
    SyncEvolution 0.8

     
  • svs

    svs - 2008-09-26

    Our company proxy (squid 2.7) also produce 417 error on "Expect: 100-continue"
    I can't sync my contacts :(

     
  • Patrick Ohly

    Patrick Ohly - 2008-10-04
    • priority: 5 --> 7
     
  • Patrick Ohly

    Patrick Ohly - 2008-10-09
    • status: open --> open-fixed
     
  • Patrick Ohly

    Patrick Ohly - 2008-10-11

    Patch also included upstream.

     
  • Patrick Ohly

    Patrick Ohly - 2008-10-11
    • status: open-fixed --> closed-fixed
     
  • Richard Neish

    Richard Neish - 2009-01-01

    Hi,

    I installed the latest SyncEvolution deb package from http://www.estamos.de/download/apt (Package syncevolution-evolution, version 1:0.8.1-2) but I think I am still seeing this error. I'm running Ubuntu Intrepid.

    $ syncevolution --version
    SyncEvolution 0.8.1
    using libedataserver-1.2.so.11
    using libebook-1.2.so.9
    using libecal-1.2.so.7

    My client.log shows the following:
    ...
    [DEBUG] header out: User-Agent: SyncEvolution
    [DEBUG] header out: Host: [snip]
    [DEBUG] header out: Accept: */*
    [DEBUG] header out: Content-Type: application/vnd.syncml+xml
    [DEBUG] header out: Content-Length: 2019
    [DEBUG] header out: Expect: 100-continue
    [DEBUG] header out:
    20:57:05 GMT [DEBUG] header in: HTTP/1.1 417 Expectation Failed
    20:57:05 GMT [DEBUG] header in: Connection: close
    20:57:05 GMT [DEBUG] header in: Content-Length: 0
    20:57:05 GMT [DEBUG] header in: Date: Thu, 01 Jan 2009 20:57:05 GMT
    20:57:05 GMT [DEBUG] header in: Server: lighttpd/1.4.18
    20:57:05 GMT [DEBUG] header in:
    20:57:05 GMT [DEBUG] libcurl info: Closing connection #0
    ...

    Do I need to install from source to get the fix for this? I took a look at the source for syncevolution-0.8.1 and the file src/client-api/src/c++/posix/http/CurlTransportAgent.cpp still has a reference to the Expect header in line 81:
    slist = curl_slist_append(NULL, "Expect:");

    Any ideas?

    Richard

     
  • Patrick Ohly

    Patrick Ohly - 2009-01-02

    > I took a look
    > at the source for syncevolution-0.8.1 and the file
    > src/client-api/src/c++/posix/http/CurlTransportAgent.cpp still has a
    > reference to the Expect header in line 81:
    > slist = curl_slist_append(NULL, "Expect:");

    That is the fix. Listing the value explicitly with no value suppresses generating the "Expect: 100". It worked with libcurl 7.15.5-1etch1 (Debian Etch), but now that you have mentioned it, I also checked with libcurl7.18.0-1ubuntu2 (Ubuntu 8.04) and there I can reproduce that the problem is back.

    I need to check whether that is a regression in libcurl and how this can be worked around.

     
  • Patrick Ohly

    Patrick Ohly - 2009-01-02
    • status: closed-fixed --> open-accepted
     
  • Patrick Ohly

    Patrick Ohly - 2009-01-06
    • status: open-accepted --> open-fixed
     
  • Patrick Ohly

    Patrick Ohly - 2009-01-06

    I'm no longer sure whether the "fix" ever worked. The explicit "Expect:" header was overwritten later on. I fixed the issue properly this time around. Not sure why I missed it when testing the first patch - sorry! :-/

    Richard, I'm not sure when I'll be able to put out new binaries. In the meantime please compile from source after applying the attached patch: in the src/client-api directory use "patch -p1 < 'name of patch file'"

    File Added: curl-expect-II.patch

     
  • Patrick Ohly

    Patrick Ohly - 2009-01-06
     
  • Richard Neish

    Richard Neish - 2009-01-07

    Awesome, that's fixed it for me. I thought it made more sense to set the header values in sendMessage() than in the constructor. Thanks for the quick fix.

     

Log in to post a comment.