Closed Bug 201210 Opened 21 years ago Closed 21 years ago

Publishing to webdav server gives error when it goes OK [chunking?]

Categories

(SeaMonkey :: Composer, defect, P2)

x86
Linux

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.4final

People

(Reporter: mikeypotter, Assigned: darin.moz)

Details

(Keywords: regression, Whiteboard: [adt2])

Attachments

(4 files)

If you publish to a webdav server with Composer (tested with 1.3 and 1.4 alpha
on Redhat 8), the dialog gives back an error saying that the publishing does not
work.
However, if you look on the server, the file has been uploaded without any problems.
Related bugs: bug 200839, bug 198652, bug 197585
I downloaded Netscape 7 and tried it, and it worked without a problem.
(Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02)
I can help track this down, if you need a test server or would like more
information in the logs.
a test server would be awesome!  HTTP logs would be good too.  to capture a HTTP
log just enable these environment variables before running moz:

  bash$ export NSPR_LOG_MODULES=nsHttp:5
  bash$ export NSPR_LOG_FILE=/tmp/log.txt

upload /tmp/log.txt to this bug report or send it directly to me.  thx!
OK, here's the log.
I started mozilla with mozilla --editor
I tried to upload a file to our internal webdav server, it failed but the file
ended up on the server.
There must be something wrong in the configuration for my server, because if I
use the public test site available at
http://webdav.silverstream.com/Director/WebDAVService/main/ with the username
"devcenter" and the password "rocks" as outlined
http://developer.novell.com/extend/director/1194.html, the file does get
uploaded without any problem.
Here's the log file when trying to upload to the test server and having it work
without any errors. (I don't know what environment they have setup to make it
work properly)
This is another failure from my own server, which is running pretty much the
same thing as the first failure (Apache, mod_dav)
One thing that I noticed that was different between the two servers that didn't
work and the one that did was the line:
 Transfer-Encoding: chunked
Googling for Transfer-Encoding: chunked mod_dav apache gives me this page:
http://www.google.ca/search?q=cache:hoHkAj-EsIMC:www.webdav.org/goliath/davlib.html+Transfer-Encoding:+chunked+mod_dav+apache&hl=en&ie=UTF-8
which contains:
# 1.5 - Jan 9, 2000. Added the OPTIONS HTTP method. Refactored code from
CDAVRequest into the CDAVContext class. Fixed bug where any HTTP/DAV response
over 32k was not processed properly. Added missing HTTP 1.1 feature - support
for chunked transfer encoding.
# 1.5.1 - January 29, 2000. Tightened up XML parsing strictness; removed some
code that erroneously dealt with bad XML because of improper handling of the
HTTP 1.1 chunked transfer encoding. Fixed a bug in CDAVRequest::GetResource
where in some cases, the downloaded file's length was errantly set to zero,
nulling out the data. Work done with CDAVRequest::GetResource; Internet config
is now used to type the newly created files. Also fixed a PowerPlant bug where
files are made zero length if temporary files are used in the LDynamicBuffer
class. Finally, fixed bug in CDAVContext where the field m_hasUserCred was not
initially set to anything in the objects constructor.

That might be of interest, I don't know.  I can't see anything else that is
different between the server that works and the ones that don't.
thanks for all the great info mike... i'll try to nail this for beta or 1.4 at
least.
Severity: normal → major
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla1.4beta
-->darin since he said he was going to investigate
Assignee: composer → darin
Status: ASSIGNED → NEW
Keywords: nsbeta1
Summary: Publishing to webdav server gives error when it goes OK → Publishing to webdav server gives error when it goes OK [chunking?]
adt: need info.  Darin, would you know how rampant webdav is for publishing? 
Will this regression affect a large or small audience in your estimation?  Thanks.
Whiteboard: [need info]
Not to give too much away, but OEone is about to release a new service which is
based largely on webDAV access.  We should be releasing this today or tomorrow.
Once you've used webDAV, you don't ever want to go back to FTP.  Its great for
publishing items, and integrates well into Mac OS X, Linux and Windows ME / XP.
Status: NEW → ASSIGNED
Target Milestone: mozilla1.4beta → mozilla1.4final
ok, looks like someone is returning the error code 8000ffff
(NS_ERROR_UNEXPECTED) from the OnDataAvailable call issued by the nsHttpChannel.
 i'm going to run through the debugger now to see who where it is coming from.
ok, this is a bug in webbrowserpersist.  for some reason, the
webbrowserpersist's OnDataAvailable implementation consumes no data.  that
violates the nsIStreamListener API and causes necko to cancel the HTTP channel
(because otherwise necko would continue in an infinite loop).  the PUT succeeds
because the server does not send a response body until after the entire document
has been uploaded.  this is probably only a problem on servers that send a
response body with the "201 created" message.
Attached patch v1 patchSplinter Review
this patch does the trick.
Attachment #123368 - Flags: superreview?(alecf)
Attachment #123368 - Flags: review?(adamlock)
Comment on attachment 123368 [details] [diff] [review]
v1 patch

This patch looks fine to me but is there a missing header file change?	Will
some platforms see a warning because there is no prototype for DiscardSegments?
 Actually, I'd guess it should be fine.  r=brade
Attachment #123368 - Flags: review?(adamlock) → review+
no header file needed.  DiscardSegments is declared static.  i actually ripped
the code from nsHttpChannel.cpp for this.  i was thinking it might be nice to
provide exports from libxpcom for this, but that can wait.
adt: nsbeta1+/adt2
Keywords: nsbeta1nsbeta1+
Whiteboard: [need info] → [adt2]
Comment on attachment 123368 [details] [diff] [review]
v1 patch

sr=alecf
Attachment #123368 - Flags: superreview?(alecf) → superreview+
Comment on attachment 123368 [details] [diff] [review]
v1 patch

requesting drivers approval for 1.4 final: very simple patch, UI polish.
Attachment #123368 - Flags: approval1.4?
Comment on attachment 123368 [details] [diff] [review]
v1 patch

a=asa (on behalf of drivers) for checkin to 1.4
Attachment #123368 - Flags: approval1.4? → approval1.4+
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Reporter,

Could you please try this out with the latest nightly build ?
On Mike's behalf ( who won't be around for at least two weeks ) I tested today's
build and the problem is fixed. Thanks.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: