Status

()

--
critical
VERIFIED FIXED
18 years ago
17 years ago

People

(Reporter: dougt, Assigned: dougt)

Tracking

Trunk
mozilla0.9
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Assignee)

Description

18 years ago
I have been working of resolving some ftp problems which include:

53002
53429 (?)  Now should alert
67852
57763
32307
60509
71178
70580
71734
66330
(Assignee)

Comment 1

18 years ago
Created attachment 27965 [details]
Text description of changes.
(Assignee)

Comment 2

18 years ago
Created attachment 27967 [details] [diff] [review]
Patch v.1

Comment 3

18 years ago
"
+    if (mPrompter && NS_FAILED(mInternalError) && +        (mInternalError !=
NS_ERROR_UNKNOWN_HOST ||
+         mInternalError != NS_ERROR_NET_TIMEOUT ))
+    {  
+        nsAutoString    title;
+        title.AssignWithConversion("Error");        // localization
+        nsAutoString    text;
+        text.AssignWithConversion(mResponseMsg);
+        
+        (void) mPrompter->Alert(title.GetUnicode(), text.GetUnicode());
+    }
+
"

The docshell throws timeout and dns failure alerts, why are you doing this here?


"
 nsFtpControlConnection::Connect()
 {
@@ -137,6 +150,11 @@
     nsresult rv;
     nsCOMPtr<nsIInputStream> inStream;
 
+    // nsCOMPtr<nsISocketTransport> sTrans = do_QueryInterface(mCPipe);
+    //if (!sTrans) return NS_ERROR_FAILURE;
+    //rv = sTrans->SetSocketTimeout(25);  
+    //if (NS_FAILED(rv)) return rv;
+
"

"25" who? what? when? where? why? :-). At least a #define please... perhaps a pref?

I'm sure you've already gone through this excersize, but just in case...
regarding OnStart/Stop pairs. It's required that a protocol handler spew *both*,
in the following order, OnStart, OnStop, in *all* cases. Please do a mental
check on the following. 

Will an OnStart|OnStop pair be propegated to the consumer (the one who initiated
the request for "ftp://foo") after the request is initiated via AsyncOpen() when:

1. The user hits the cancel button before the server has even been resolved?
2. The user hits cancel after the server has been resolved, but the connection
has not been established? 1 and 2 used to be considered the same from FTP's
standpoint, that may still be the case.
3. The user hits cancel during control connection activity?
4. The user hits cancel during data connection activity (middle of a download:
directory listing download as well as file)?
5. The DNS lookup fails?
6. The socket transport connection fails (timeout, interrupt, whatever)?
7. The user or password command fails?
8. Some other control connection command fails?
9. The data connection fails (timeout, close(), whatever, just some socket error)?

Same 9 above but for a synchronous read (if supported).

(Assignee)

Comment 4

18 years ago
> The docshell throws timeout and dns failure alerts, why are you doing this here?


I am capturing error should could be created by the ftp protocol (eg. Could not
create data connection, Ratio requirements, Dir/file does not exists).  The two
errors that I am checking against are handled above FTP by the webshell.. The
web shell will throw this dialogs.  

yes, it sucks that this happens in to places.   It would be great if the clients
could know about all of the different errors that FTP could genereate, but after
talking with conrad and gagan, we believe that serious errors, such as these,
should either be Alert()'ed or passed to an event sink.  I took the less work
approach and used Alerts, just like it was done in the other protocols.  The
more I think about this, the more I think that we should just pass this error
via the nsIProgressEventSink and let the clients deal with hit.  We should
probably file a bug on this.  Would this be required for embedding??




+    // nsCOMPtr<nsISocketTransport> sTrans = do_QueryInterface(mCPipe);
+    //if (!sTrans) return NS_ERROR_FAILURE;
+    //rv = sTrans->SetSocketTimeout(25);  
+    //if (NS_FAILED(rv)) return rv;
+
"

"25" who? what? when? where? why? :-). At least a #define please... perhaps a pref?


Heh.  It should have been:  #define DOUGT_STRESS_TEST  I will fix this.


Jud, thanks for this list.  It is a pretty good breakdown.  To answer this more
directly, here is what ftp does.  Before I open up a data connection, if any
error occurs, a onStart and onStop will be fired to the consumer.  Once the data
connection has been established, the socket transport will fire these
notifications (though a "forwarder" wrapper).  

I will verify that these cases are all met today.  If any are not, you will hear
back from me.

Status: NEW → ASSIGNED
(Assignee)

Comment 5

18 years ago
Created attachment 28269 [details] [diff] [review]
Patch v.2 - Includes uriloader OnStart workarounds.
(Assignee)

Comment 6

18 years ago
The last patch includes a workaround to shield the URILoader from OnStartRequest
notifications until the data connection has something to give it.  Without this
workaround, errors prior to any data being recieved resulted in a page
transition.

Also the patch includes the suggests from Jud.

(Assignee)

Updated

18 years ago
Severity: normal → critical
Target Milestone: --- → mozilla0.9

Comment 7

18 years ago
r=valeski on patch v.2
(Assignee)

Comment 8

18 years ago
thanks
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 9

17 years ago
VERIFYING:
Each bug will be verified/has been for correct behavior.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.