Closed
Bug 123044
Opened 23 years ago
Closed 23 years ago
charset should be on nsIChannel, not nsIHttpChannel
Categories
(Core :: Networking, defect, P3)
Core
Networking
Tracking
()
VERIFIED
FIXED
mozilla1.0
People
(Reporter: bzbarsky, Assigned: darin.moz)
References
Details
(Keywords: arch, topembed+)
Per IRC discussion with Darin, we should expose charset on nsIChannel, not
nsIHttpChannel. Then parts of multipart channels should also expose their
charsets.
| Assignee | ||
Comment 1•23 years ago
|
||
cc'ing some folks who might have input on this.
Comment 2•23 years ago
|
||
there are more channels than not which do not care about charsets. Why forces
this on them?
| Assignee | ||
Comment 3•23 years ago
|
||
dougt:
true, but it is very common for nsIChannel clients to want to know if there is
charset information. just like contentLength and contentType, these values can
have defaults which mean "channel doesn't know." eg. we could use a value of
NULL to indicate an unknown charset.
also, it just seems like something you'd generically need if given a random data
stream. things like contentType and contentLength make sense, and so does
contentCharset. it's a way of identifying the data in a generic way. therefore
seems appropriate to provide it on nsIChannel.
IMO the fact that many protocols don't provide a charset doesn't necessarily
justify leaving it off of nsIChannel.
Comment 4•23 years ago
|
||
Yep... I agree. The notion of 'charset' needs to be pushed up into nsIChannel.
Since we expose the content-type at the nsIChannel level, we need to provide
charset info so consumers know how to interpret "text/..." content without
relying on protocol-specific interface methods...
RFC 2277 also puts forth an argument for having the 'charset available for ALL
protocols...' (just to reference an RFC :-))
Will this remain a 'readonly attribute string' ?
i also think that we should document that the returned charset must be a IANA
registered name... just to be clear that ALL protocols must use the same
charset namespace...
-- rick
| Assignee | ||
Comment 5•23 years ago
|
||
it should probably be a r/w attribute so content sniffers can assign/override
default charset as specified by the channel impl.
| Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla0.9.9
Comment 7•23 years ago
|
||
sounds good to me ;-)
-- rick
| Assignee | ||
Updated•23 years ago
|
Keywords: arch,
mozilla1.0
Comment 9•23 years ago
|
||
Moving Netscape owned 0.9.9 and 1.0 bugs that don't have an nsbeta1, nsbeta1+,
topembed, topembed+, Mozilla0.9.9+ or Mozilla1.0+ keyword. Please send any
questions or feedback about this to adt@netscape.com. You can search for
"Moving bugs not scheduled for a project" to quickly delete this bugmail.
Target Milestone: mozilla1.0 → mozilla1.2
| Assignee | ||
Comment 10•23 years ago
|
||
forgot to add topembed on this one.
Keywords: topembed
Target Milestone: mozilla1.2 → mozilla1.0
Updated•23 years ago
|
| Assignee | ||
Comment 11•23 years ago
|
||
fixed-on-trunk
see patch in bug 128508
created nsIChannel::contentCharset, removed nsIHttpChannel::charset.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 12•23 years ago
|
||
VERIFIED:
http://lxr.mozilla.org/mozilla1.0/source/netwerk/base/public/nsIChannel.idl#118
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=nsIHttpChannel.idl&root=/cvsroot&subdir=mozilla/netwerk/protocol/http/public&command=DIFF_FRAMESET&rev1=1.7&rev2=1.8
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•