View source channel should impl nsIUploadChannel if it impls nsIHttpChannel

RESOLVED FIXED

Status

()

Core
Networking
RESOLVED FIXED
17 years ago
17 years ago

People

(Reporter: bz, Assigned: bz)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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.

Comment 1

17 years ago
cc'ing rpotts... his nsIWebPageDescriptor solution may make all of this unnecessary.
Created attachment 67306 [details] [diff] [review]
More interface hackery

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 3

17 years ago
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 4

17 years ago
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
Last Resolved: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.