Login | Register
My pages Projects Community openCollabNet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Catacomb] Content-type question.



Hi

I did that quick fix to skunkdav so it will use text/xml for all requests. We might use a special case for PUT to put different content-type, but if the server ignores it anyway, wouldn't that be great? wink wink

So, apache has a module for deciding the content type.

There is kind of a program in UNIX that will try to "guess" the type of a file, but as far as I know it quite often fails. There's not really a perfect way to do it in general.

Yuhui

Sung Kim wrote:

Hello,

Do you know how can we deal the content type with the PUT method? Several clients such as Skunkdav always give me "application/octet-stream".
Let's suppose a client PUT "index.html" with "application/octet-stream". Should we also say index.html's content type is "application/octet-stream", when a client try to GET?

I asked several server implementers, and they said usually they ignore PUT content-type.

Than, how can we figure out content type with filename?
Does Apache have "const char *apr_get_content_type(const char *filename)". I tried to find, but I couldn't find that kind of function. Mod_dav looks like to use "ap_sub_req_lookup_uri", but it doesn't work with Catacomb.

Should I parse "mime.types"?

Any help or idea?

Have a nice day.

--
Sung Kim <hunkim@cse.ucsc.edu>
http://www.cse.ucsc.edu/~hunkim

"Dreams become reality!"

_______________________________________________
Catacomb mailing list
Catacomb@webdav.org
http://mailman.webdav.org/mailman/listinfo/catacomb