List Info

Thread: How do we find out the mime type when URL doesn'tcontain file ext




How do we find out the mime type when URL doesn'tcontain file ext
country flaguser name
United States
2007-12-14 13:49:59
Hmmm.. I don't think we've run into this problem on 
desktop systems. I would think that the call to 
IHXFileMimeMapper::FindMimeType() should not return
until the HTTP 200 OK is received.

When you trace through CHTTPFileObject::FindMimeType(),
which code path is taken?

Eric

=============================================
Eric Hyche (ehychereal.com)
Technical Lead
RealNetworks, Inc.  

> -----Original Message-----
> From: Praveen.Thimmashettynokia.com 
> [mailto:Praveen.Thimmashettynokia.com] 
> Sent: Friday, December 14, 2007 11:22 AM
> To: ehychereal.com; client-devhelixcommunity.org; 
> filesystem-devhelixcommunity.org
> Subject: RE: [Client-dev] How do we find out the mime
type 
> when URL doesn'tcontain file extension?
> 
> Hi Eric,
> I am talking about filesystem/http.
> 
> HxFilesource loads httpfilesys and looks for content
type values from
> the filesystem to find out the mime type. If these
values are not
> present it goes and creates the file recognizer to know
the 
> mime type. 
> While handling shoutcast links, httpfilesys is
providing content type
> values. Hence there is no need to create the file
recognizer 
> to know the
> mime type. hence looking for the file extension is
avoided.
> 
> My question is httpfilesys can provide content type
values to
> Hxfilesource only after httpfilesys receives 200 OK
response. Http
> response header has this value.
> But this response comes to httpfilesys only after 
> hxfilesource finishes
> with checking the content type values from httpfilesys.
Hence
> hxfilesource doesn't know about the content type values
at the right
> time. hxfilesource goes and creates the file recognizer
to 
> know the mime
> type which will look for the file extension.
>  
> I am not clear about how exactly are we taking care of
url 
> which doesn't
> have file extension.
> 
> Thanks
> Praveen  
> 
> -----Original Message-----
> From: ext Eric Hyche [mailto:ehychereal.com]

> Sent: Thursday, December 13, 2007 6:14 PM
> To: Thimmashetty Praveen (Nokia-TP-MSW/Dallas);
> client-devhelixcommunity.org; filesystem-devhelixcommunity.org
> Subject: RE: [Client-dev] How do we find out the mime
type when URL
> doesn'tcontain file extension?
> 
> 
> Are you saying there is no Content-Type in the HTTP
response? Or that
> the Content-Type is present, but it's still not
recognizing the mime
> type?
> 
> Are you using the httplite file object
(filesystem/httplite) 
> or the full
> http file object (filesystem/http)?
> 
> Eric
> 
> =============================================
> Eric Hyche (ehychereal.com)
> Technical Lead
> RealNetworks, Inc.  
> 
> > -----Original Message-----
> > From: client-dev-bounceshelixcommunity.org
> > [mailto:client-dev-bounceshelixcommunity.org] On
Behalf Of 
> > Praveen.Thimmashettynokia.com
> > Sent: Thursday, December 13, 2007 5:08 PM
> > To: client-devhelixcommunity.org;
filesystem-devhelixcommunity.org
> > Subject: [Client-dev] How do we find out the mime
type when URL 
> > doesn'tcontain file extension?
> > 
> > I am trying to get shout cast links(most of them
don't have file 
> > extension as a part of url eg:
> > http://195.214.242.74:8000
 <http://195.214.242.74:
8000>  ) 
> working on 
> > helix.
> > 
> > In httpfilesys, once we get 200 OK then
content-type and mime type 
> > pair values are set by the httpfilesys on the
response 
> header. Hence 
> > Hxfilesource can use these values to know the mime
type 
> during extend 
> > setup.
> > 
> > HxFileSource instantiates httpfilesys during setup
and while doing 
> > extended Setup, it looks for content type and mime
type value pair 
> > provided by the httpfilesys. If these values are
existing, 
> then Url is
> 
> > taken care without looking for file extension.
> > 
> > But in httpfilesys we get 200 OK only during
finish Setup. 
> > Hence httpfilesys can provided these content type
and mime 
> type value 
> > only after filesource done with extended setup.
> > 
> > how exactly are we handling this case? 
> > 
> > Thanks
> > Praveen
> > 
> > 
> 


_______________________________________________
Filesystem-dev mailing list
Filesystem-devhelixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/
filesystem-dev

How do we find out the mime type when URL doesn'tcontain file ext
user name
2007-12-14 15:31:50
Hi Eric,

I am trying to add 'handling of url with no file extension'
support to
filesystem/httplite. By referring to filesystem/http I found
that,
filesystem itself is providing the content type value to
find out the
mime type and avoid creating the file recognizer. 
I don't have filesystem/http ported to platform I am working
with. Hence
I can't trace the code :-(.

HxFileSource::setup -> loads httpfilesys
HxFileSource::extendedsetup -> checks for content type
values from the
httpfilesys to determine mime type
HXFileSource::Finishsetup -> init the httpfilesys
(httpfilesys gets 200
OK here)

Since HxFileSource handling of httpfilesys is similar for
both httplite
and http, I was curious to know how filesystem/http is
managing to
provide content type values during extendedsetup.

Could you suggest me a way to have this support for
httplite.

Thanks
Praveen 




-----Original Message-----
From: ext Eric Hyche [mailto:ehychereal.com] 
Sent: Friday, December 14, 2007 1:50 PM
To: Thimmashetty Praveen (Nokia-TP-MSW/Dallas);
client-devhelixcommunity.org; filesystem-devhelixcommunity.org
Subject: RE: [Client-dev] How do we find out the mime type
when URL
doesn'tcontain file extension?


Hmmm.. I don't think we've run into this problem on desktop
systems. I
would think that the call to
IHXFileMimeMapper::FindMimeType() should not return until
the HTTP 200
OK is received.

When you trace through CHTTPFileObject::FindMimeType(),
which code path
is taken?

Eric

=============================================
Eric Hyche (ehychereal.com)
Technical Lead
RealNetworks, Inc.  

> -----Original Message-----
> From: Praveen.Thimmashettynokia.com
> [mailto:Praveen.Thimmashettynokia.com]
> Sent: Friday, December 14, 2007 11:22 AM
> To: ehychereal.com; client-devhelixcommunity.org; 
> filesystem-devhelixcommunity.org
> Subject: RE: [Client-dev] How do we find out the mime
type when URL 
> doesn'tcontain file extension?
> 
> Hi Eric,
> I am talking about filesystem/http.
> 
> HxFilesource loads httpfilesys and looks for content
type values from 
> the filesystem to find out the mime type. If these
values are not 
> present it goes and creates the file recognizer to know
the mime type.
> While handling shoutcast links, httpfilesys is
providing content type 
> values. Hence there is no need to create the file
recognizer to know 
> the mime type. hence looking for the file extension is
avoided.
> 
> My question is httpfilesys can provide content type
values to 
> Hxfilesource only after httpfilesys receives 200 OK
response. Http 
> response header has this value.
> But this response comes to httpfilesys only after
hxfilesource 
> finishes with checking the content type values from
httpfilesys. Hence

> hxfilesource doesn't know about the content type values
at the right 
> time. hxfilesource goes and creates the file recognizer
to know the 
> mime type which will look for the file extension.
>  
> I am not clear about how exactly are we taking care of
url which 
> doesn't have file extension.
> 
> Thanks
> Praveen
> 
> -----Original Message-----
> From: ext Eric Hyche [mailto:ehychereal.com]
> Sent: Thursday, December 13, 2007 6:14 PM
> To: Thimmashetty Praveen (Nokia-TP-MSW/Dallas); 
> client-devhelixcommunity.org; filesystem-devhelixcommunity.org
> Subject: RE: [Client-dev] How do we find out the mime
type when URL 
> doesn'tcontain file extension?
> 
> 
> Are you saying there is no Content-Type in the HTTP
response? Or that 
> the Content-Type is present, but it's still not
recognizing the mime 
> type?
> 
> Are you using the httplite file object
(filesystem/httplite) or the 
> full http file object (filesystem/http)?
> 
> Eric
> 
> =============================================
> Eric Hyche (ehychereal.com)
> Technical Lead
> RealNetworks, Inc.  
> 
> > -----Original Message-----
> > From: client-dev-bounceshelixcommunity.org
> > [mailto:client-dev-bounceshelixcommunity.org] On
Behalf Of 
> > Praveen.Thimmashettynokia.com
> > Sent: Thursday, December 13, 2007 5:08 PM
> > To: client-devhelixcommunity.org;
filesystem-devhelixcommunity.org
> > Subject: [Client-dev] How do we find out the mime
type when URL 
> > doesn'tcontain file extension?
> > 
> > I am trying to get shout cast links(most of them
don't have file 
> > extension as a part of url eg:
> > http://195.214.242.74:8000
 <http://195.214.242.74:
8000>  )
> working on
> > helix.
> > 
> > In httpfilesys, once we get 200 OK then
content-type and mime type 
> > pair values are set by the httpfilesys on the
response
> header. Hence
> > Hxfilesource can use these values to know the mime
type
> during extend
> > setup.
> > 
> > HxFileSource instantiates httpfilesys during setup
and while doing 
> > extended Setup, it looks for content type and mime
type value pair 
> > provided by the httpfilesys. If these values are
existing,
> then Url is
> 
> > taken care without looking for file extension.
> > 
> > But in httpfilesys we get 200 OK only during
finish Setup. 
> > Hence httpfilesys can provided these content type
and mime
> type value
> > only after filesource done with extended setup.
> > 
> > how exactly are we handling this case? 
> > 
> > Thanks
> > Praveen
> > 
> > 
> 


_______________________________________________
Filesystem-dev mailing list
Filesystem-devhelixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/
filesystem-dev

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )