On Thu, Apr 3, 2008 at 3:46 PM, Brian Eaton <[EMAIL PROTECTED]> wrote:
> On Thu, Apr 3, 2008 at 3:36 PM, Kevin Brown <[EMAIL PROTECTED]> wrote: > > The current code always extracts contentType from the headers, unless > > they're not set. They should always be the exact same value, unless > there's > > no Content-Type header. It's extracted at creation time and there's no > way > > to modify it after that (or the headers). > > OK, so the only possible disconnect in RemoteContentRequest occurs if > the content-type header is not specified by the gadget. There also > happens to be some shindig code that copies headers out of the > request. Does that play here too? I thought that only happened before it was constructed. What are you referring to specifically? > > > > The reason why I added this method was because there are cases where > you > > need to extract the contentType, and there's a lot of boiler plate code > for > > doing so...no sense duplicating it. > > That's a good reason, we should just figure out which is authoritative > and, if possible, get rid of the other one. > Yeah, that's tricky. The problem is that Content-Type must be present in the actual request, but at the same time we don't want it duplicated. We could possibly remove it from the request headers after extracting and require that all fetchers that pass headers explicitly pass the Content-Type themselves. -- ~Kevin

