Writing files through proxy

  • Carlos

    Carlos - 2009-02-03


    I'm having problems storing files on a remote webdav server, though a proxy. Whithout proxy, everything works fine. With proxy, I can connect, read files, but everytime i try to save some file, it gets truncated to 0 bytes.

    I don't have access to server logs, as I'm using a free account of hasfiles.com services.
    However, I do have logs of davfs. Here's the relevant part (I removed IPs and addresses):

    mount.davfs: Sending request headers: PUT http://ACCOUNT.hasfiles.com/storage/teste2 HTTP/1.1^M Host: ACCOUNT.hasfiles.com^M User-Agent: davfs2/1.3.3 neon/0.28.2^M Keep-Alive: ^M Proxy-Connection: Keep-Alive^M Connection: TE^M TE: trailers^M Content-Length: 13^M Expect: 100-continue^M Authorization: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    mount.davfs: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx^M If: <http://ACCOUNT.hasfiles.com/storage/teste2> (<opaquelocktoken:b92d7420ed4a0ca32bdcbe4195b38b63>)^M ^M
    mount.davfs: Sending request-line and headers:
    mount.davfs: Connecting to PROXY_IP
    mount.davfs: Request sent; retry is 0.
    mount.davfs: [status-line] < HTTP/1.0 409 Conflict^M
    mount.davfs: [hdr] Pragma: No-cache^M
    mount.davfs: Header Name: [pragma], Value: [No-cache]
    mount.davfs: [hdr] Cache-Control: no-cache^M
    mount.davfs: Header Name: [cache-control], Value: [no-cache]
    mount.davfs: [hdr] Expires: Wed, 31 Dec 1969 19:00:00 EST^M
    mount.davfs: Header Name: [expires], Value: [Wed, 31 Dec 1969 19:00:00 EST]
    mount.davfs: [hdr] Content-Type: text/html;charset=utf-8^M
    mount.davfs: Header Name: [content-type], Value: [text/html;charset=utf-8]
    mount.davfs: [hdr] Content-Length: 1004^M
    mount.davfs: Header Name: [content-length], Value: [1004]
    mount.davfs: [hdr] Date: Tue, 03 Feb 2009 11:39:08 GMT^M
    mount.davfs: Header Name: [date], Value: [Tue, 03 Feb 2009 11:39:08 GMT]
    mount.davfs: [hdr] Server: Apache-Coyote/1.1^M
    mount.davfs: Header Name: [server], Value: [Apache-Coyote/1.1]
    mount.davfs: [hdr] X-Cache: MISS from PROXY^M
    mount.davfs: Header Name: [x-cache], Value: [MISS from PROXY]
    mount.davfs: [hdr] X-Cache-Lookup: MISS from PROXY^M
    mount.davfs: Header Name: [x-cache-lookup], Value: [MISS from PROXY]
    mount.davfs: [hdr] Via: 1.0 PROXY (squid/2.6.STABLE6)^M
    mount.davfs: Header Name: [via], Value: [1.0 PROXY (squid/2.6.STABLE6)]
    mount.davfs: [hdr] Proxy-Connection: close^M
    mount.davfs: Header Name: [proxy-connection], Value: [close]
    mount.davfs: [hdr] ^M
    mount.davfs: End of headers.
    mount.davfs: Running post_headers hooks
    mount.davfs: Reading 1004 bytes of response body.
    mount.davfs: Got 1004 bytes.
    mount.davfs: Running post_send hooks
    mount.davfs: sess: Closing connection.
    mount.davfs: sess: Connection closed.
    mount.davfs: Request ends, status 409 class 4xx, error line: 409 Conflict
    mount.davfs: Running destroy hooks.
    mount.davfs: Request ends.
    mount.davfs: tidy: neon error
    mount.davfs:       409 Conflict

    Btw, I'm using version 1.3.3 on a Ubuntu 8.10 machine.


    • Werner Baumann

      Werner Baumann - 2009-02-03

      The proxy reports 409 Conflict, but it is not clear what the conflict is.

      As the proxy is HTTP/1.0 it probably gets confused by the "Expect: 100" header used by davfs2. You can turn off the use of this header with configuration option "use_expect100 0". This header is not of much use anyway.

      If this does not help: the response of the proxy contains a body which is not logged by davfs2. You can turn on logging of the body with additional debug option "debug httpbody". It might have some usefull description of the conflict (or not).

      Another possible reason: as far as I know, HTTP-methods (like PUT) can be separately enabled or disabled in the squid-configuration file. Maybe the proxy does not allow PUT.

      If none of this helps, it would be nice to have the complete error message from the proxy (the body).


    • Carlos

      Carlos - 2009-02-04

      The "use_expect100 0" option worked.

      Thanks, and keep up the good work !

  • Anonymous

    Anonymous - 2012-04-27

    Honorary President Franck Muller of Baume & Mercier inamorikazuo and Vice President ZENG Qinghong (then) Honorary President of inamorikazuo a meeting with State Councillor Tang Jiaxuan in Beijing (then) meeting in Beijing was established in September 2004 Japan medical materials Corporation in October 2004 in Japan set up Kyocera Maruzen system integration company in setting up Kyocera Solar Europe s.r.o in the Czech Republic. In April 2005, domestic solar energy sales business into the company of Kyocera Kyocera Kyocera solar energy Solar Europe s.r.o. starting the Czech factory in August 2005 acquisition of Japan IBM Corporation, wild lands, buildings and other assets of Jacob & Co Chau in January 2006 in Korea set up Kyocera Korea Corporation in April 2006 in Japan up KCCS management advisory company limited 2006 August Kyocera trading company in Shanghai


Log in to post a comment.