Closed Bug 122851 Opened 23 years ago Closed 23 years ago

View source channel should impl nsIUploadChannel if it impls nsIHttpChannel

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(1 file)

If we try to send postdata with a viewsource channel we crash in
nsDocShell::DoURILoad because of the following:

nsCOMPtr<nsIUploadChannel> uploadChannel(do_QueryInterface(httpChannel));
NS_ASSERTION(uploadChannel, "http must support nsIUploadChannel");

// we really need to have a content type associated with this stream!!
uploadChannel->SetUploadStream(aPostData,nsnull, -1);

We trigger the assertion, of course.  :)

Nothing posts to view source channels yet, but eventually we will (once all
those pesky view source bugs are fixed).

Patch coming up.
cc'ing rpotts... his nsIWebPageDescriptor solution may make all of this unnecessary.
Attaching patch just in case.  If rpotts' solution allows us to rip all this
interface hackery out of the view source channel, so much the better.  If not,
we'll likely need this.
Comment on attachment 67306 [details] [diff] [review]
More interface hackery

r/sr=rpotts@netscape.com

This looks good to me...  cause we'll need view-source channels to look 'just
like http channels' if we end up forcing a reload from the server ...
Attachment #67306 - Flags: superreview+
Comment on attachment 67306 [details] [diff] [review]
More interface hackery

r/sr=darin too then
Attachment #67306 - Flags: review+
Checked in, then.  Thanks for the reviews!
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: