Open Bug 949947 Opened 12 years ago Updated 3 years ago

http activity observer notify same data for complete or incomplete response

Categories

(Core :: Networking: HTTP, defect, P5)

x86_64
Windows 8
defect

Tracking

()

UNCONFIRMED

People

(Reporter: christophe.mouraud, Unassigned)

Details

(Whiteboard: [necko-would-take])

User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36 Steps to reproduce: I use the nsIHttpActivityDistributor service to track incomplete download because some error are not notified in nsIChannel::OnStopRequest method (see bug 947846); so i add an observer to my http channel. Actual results: I receive the same notification for a complete or incomplete download. If the response is not complete, the nsHttpTransaction::Close method call the observer with same parameters than in normal case. The call for a incomplete response in nsHttpTransaction::Close method: 828 if (mActivityDistributor) { 829 // report the reponse is complete if not already reported 830 if (!mResponseIsComplete) 831 mActivityDistributor->ObserveActivity( 832 mChannel, 833 NS_HTTP_ACTIVITY_TYPE_HTTP_TRANSACTION, 834 NS_HTTP_ACTIVITY_SUBTYPE_RESPONSE_COMPLETE, 835 PR_Now(), 836 static_cast<uint64_t>(mContentRead), 837 EmptyCString()); 838 The call for a complete response in nsHttpTransaction::HandleContent method: 1577 // report the entire response has arrived 1578 if (mActivityDistributor) 1579 mActivityDistributor->ObserveActivity( 1580 mChannel, 1581 NS_HTTP_ACTIVITY_TYPE_HTTP_TRANSACTION, 1582 NS_HTTP_ACTIVITY_SUBTYPE_RESPONSE_COMPLETE, 1583 PR_Now(), 1584 static_cast<uint64_t>(mContentRead), 1585 EmptyCString()); Expected results: I'd like a way to distinguish the two cases : - add a new code like NS_HTTP_ACTIVITY_SUBTYPE_RESPONSE_INCOMPLETE, - or change the last parameter string value to indicate the error : "incomplete response" or other Sorry about my poor English level.
Whiteboard: [necko-would-take]
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.