Closed
Bug 18424
Opened 26 years ago
Closed 21 years ago
nsHTTPHandler::NewPostDataStream should be a stream converter
Categories
(Core :: Networking, defect, P3)
Tracking
()
VERIFIED
INVALID
Future
People
(Reporter: warrensomebody, Assigned: gagan)
References
Details
(Whiteboard: 1 day)
Jud: We talked about this in our necko meeting today. NewPostDataStream makes
an instance of nsHTTPEncodeStream to convert CRLF conventions, etc. (I was
mistaken when I said this was a method on nsIOService.) This should be changed
to be a normal stream converter.
Note that unlike other stream converters, this one is used for data going out
to the server, as opposed to coming in. I hope that doesn't throw a wrench in
the architecture.
Reporter | ||
Updated•26 years ago
|
Target Milestone: M14
Bulk move of all Necko (to be deleted component) bugs to new Networking
component.
Comment 2•26 years ago
|
||
out to server issue shouldn't matter. nsIStreamConverterService provides input
stream conversion. How the stream is used doesn't matter.
Status: NEW → ASSIGNED
Reporter | ||
Comment 3•26 years ago
|
||
I'm not sure what you mean by that comment. My point is that when sending to a
server, you may have an arbitrary mime type in hand that requires conversion
before sending. Right now, we're hard-coding one converstion (or is it 2?) in
nsHTTPEncodeStream -- it would be better if this was generalized to just invoke
the stream converter stuff.
Comment 5•25 years ago
|
||
Ok, I've poked around with this a bit and here's what I've come up with. HTTP
provides some encode/post data stream creation apis. These provide an input
stream to the caller which does "encoding/conversion" in it's implementation.
The current usage is synchronous (nsIInputStream) based as opposed to
asynchronous (nsIStreamListener) based.
nsIStreamConverter provides both a synchronous api and an asynchronous api.
Wrapping the current nsHTTPEncodeStream implementatation with the
nsIStreamConverter api is easy, and current users will just use a different
stream retrieval mechanism (nsIStreamConverterService) to get their encoding
stream.
With that said, I need to build an asynchronous encoder to fill out the async
stream converter api impl.
The current retrieval mechanism used by nsIStreamConverterService is progid
based and has grown up around mime-to-mime type mapping conventions. For
example, I may want to go from text/plain to text/html. The encode stream stuff
breaks that convention as it's not mime conversion, rather it's an encoding. I
need to figure out how to fit this stuff into the stream converter service.
potts dropped some decoders in there, maybe I can follow that lead.
This should be happening inside HTTP. We are adding way too many must-do items
for someone to do a POST. Plus this is HTTP only. The async issues should go
away when I check in AsyncWrite stuff for HTTP. Maybe we just add something like
PostAsyncWrite that does all this stuff (including finding out the correct
Content-Length to use, using the right convertors, and finally calling
AsyncWrite with it)
Comment 8•25 years ago
|
||
well, I've basically done all the work to push it out as a stream converter. Do
you want to use it as such *inside* HTTP?
Updated•25 years ago
|
Whiteboard: 1 day
Comment 10•25 years ago
|
||
the only thing holding this back is a nsIFileInputStream name collision (gotta
love different interfaces with the same name).
Target Milestone: M16 → M18
Comment 11•25 years ago
|
||
->gagan
Assignee: valeski → gagan
Status: ASSIGNED → NEW
Target Milestone: M18 → Future
Comment 13•21 years ago
|
||
this bug references code that was removed ages ago. not much here is applicable
now. marking INVALID.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•