Bug 98124 - Compressed 207 answer is not understood
Summary: Compressed 207 answer is not understood
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: webdav (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Hamish Rodda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-29 05:12 UTC by Thiago Macieira
Modified: 2005-02-18 13:57 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thiago Macieira 2005-01-29 05:12:45 UTC
Version:           desconhecido (using KDE 3.3.91 (beta1), compiled sources)
Compiler:          gcc version 3.4.3
OS:                Linux (i686) release 2.6.9

This test has been done on a local WebDAV server, with Apache. The only difference between either test, is the presence or the absence of the configuration:

	SetOutputFilter DEFLATE

The request is:
kio_http: (11558) ============ Sending Header:
kio_http: (11558) PROPFIND /svn/apfi/trunk/site/ HTTP/1.1
kio_http: (11558) Connection: Keep-Alive
kio_http: (11558) User-Agent: Mozilla/5.0 (compatible; Konqueror/3.3; Linux; X11; pt_BR, en_US) KHTML/3.3.91 (like Gecko)
kio_http: (11558) Pragma: no-cache
kio_http: (11558) Cache-control: no-cache
kio_http: (11558) Accept: text/html, image/jpeg, image/png, text/*, image/*, */*
kio_http: (11558) Accept-Encoding: x-gzip, x-deflate, gzip, deflate
kio_http: (11558) Accept-Charset: utf-8, utf-8;q=0.5, *;q=0.5
kio_http: (11558) Accept-Language: pt, en
kio_http: (11558) Host: localhost
kio_http: (11558) Depth: 0
kio_http: (11558) Content-Type: text/xml; charset=utf-8

The answer WITH the directive was:
kio_http: (11558) ============ Received Response:
kio_http: (11558) "HTTP/1.1 207 Multi-Status"
kio_http: (11558) "Date: Sat, 29 Jan 2005 04:07:26 GMT"
kio_http: (11558) "Server: Apache/2.0.52 (Unix) mod_ssl/2.0.52 OpenSSL/0.9.7e DAV/2 PHP/5.0.3 SVN/1.1.0"
kio_http: (11558) "Vary: Accept-Encoding"
kio_http: (11558) "Content-Encoding: gzip"
kio_http: (11558) "Content-Length: 431"
kio_http: (11558) "Keep-Alive: timeout=15, max=100"
kio_http: (11558) "Connection: Keep-Alive"
kio_http: (11558) "Content-Type: text/xml; charset="utf-8""
kio_http: (11558) --empty--

WITHOUT it, the answer was:
kio_http: (11559) ============ Received Response:
kio_http: (11559) "HTTP/1.1 207 Multi-Status"
kio_http: (11559) "Date: Sat, 29 Jan 2005 04:09:10 GMT"
kio_http: (11559) "Server: Apache/2.0.52 (Unix) mod_ssl/2.0.52 OpenSSL/0.9.7e DAV/2 PHP/5.0.3 SVN/1.1.0"
kio_http: (11559) "Keep-Alive: timeout=15, max=100"
kio_http: (11559) "Connection: Keep-Alive"
kio_http: (11559) "Transfer-Encoding: chunked"
kio_http: (11559) "Content-Type: text/xml; charset="utf-8""
kio_http: (11559) --empty--

The difference is the Vary: and Content-Encoding: lines.

The end result is that Konqueror displays an error saying the path doesn't exist.
Comment 1 Waldo Bastian 2005-02-17 17:13:51 UTC
Does it work with other dav clients? 
I can't reproduce here because I don't have apache 2 installed here and I can't find mod_deflate rpms for apache 1.3
Can you make your webserver accessible?
Comment 2 Thiago Macieira 2005-02-18 05:05:07 UTC
That was a Subversion repository. And libneon (Subversion's HTTP client library) works fine with it.

I can make my server available if necessary.
Comment 3 Thiago Macieira 2005-02-18 05:13:34 UTC
I should mention that GETs (answer 200) work. It's just PROPFIND (answer 207) that is mishandled. I'm not sure about other requests/replies.
Comment 4 Thiago Macieira 2005-02-18 12:21:47 UTC
Maybe related, maybe not: after I logged in to wiki.kde.org, the webpages started showing garbage. They are transferred gzipped. No DAV is involved.
Comment 5 Waldo Bastian 2005-02-18 13:57:55 UTC
CVS commit by waba: 

Fix webdav with gzip'ed encoding.
BUG: 98124


  M +2 -3      http.cc   1.637


--- kdelibs/kioslave/http/http.cc  #1.636:1.637
@@ -4148,7 +4148,6 @@ void HTTPProtocol::slotData(const QByteA
    {
       uint old_size = m_bufWebDavData.size();
-      m_bufWebDavData.resize (old_size + m_bufReceive.size());
-      memcpy (m_bufWebDavData.data() + old_size, m_bufReceive.data(),
-              m_bufReceive.size());
+      m_bufWebDavData.resize (old_size + d.size());
+      memcpy (m_bufWebDavData.data() + old_size, d.data(), d.size());
    }
 }