You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Jaswinder S. Ahluwalia" <ja...@cs.ucr.edu> on 2000/09/23 01:42:44 UTC
r->content_type
Hi,
I am a student at the university of california riverside majoring in
computer science. For the summer, i have been working in a research lab
trying to implement the apache web server using distributed shared
memory. Basically this consists of loading the files into distributed
shared memory and then serving the files to the client from that
memory. This is supposed to be faster and it reduces the load when
multiple server are running, which again, makes it faster. i am almost
done., but i do have one problem.: r->content_type.
Currently, r->content_type is NULL (when sending files from memory) so
apache automatically makes it the defaulttype located in httpd.conf.
When sending files from disk, the correct content_type is set. I was
hoping that someone could help me understand when, where, and how
r->content_type is set so that i may implement that code in my
DSM modifications to apache.
Any help you could offer would greatly be appreciated.
Thank you,
Jas
Re: r->content_type
Posted by Tony Finch <do...@dotat.at>.
"Jaswinder S. Ahluwalia" <ja...@cs.ucr.edu> wrote:
>
>Is there any documentation available for mod_mime? Also, i would still
>like to know how r->content_type is set if possible.
There's user documentation at http://www.apache.org/docs/mod/mod_mime.html
and you should look at the default Apache configuration file for examples.
You should definitely look at the source code and that will answer your
second question.
Tony.
--
en oeccget g mtcaa f.a.n.finch
v spdlkishrhtewe y dot@dotat.at
eatp o v eiti i d. fanf@covalent.net
Re: r->content_type
Posted by "Jaswinder S. Ahluwalia" <ja...@cs.ucr.edu>.
Tony Finch wrote:
> "Jaswinder S. Ahluwalia" <ja...@cs.ucr.edu> wrote:
> >
> >Currently, r->content_type is NULL (when sending files from memory) so
> >apache automatically makes it the defaulttype located in httpd.conf.
> >When sending files from disk, the correct content_type is set. I was
> >hoping that someone could help me understand when, where, and how
> >r->content_type is set so that i may implement that code in my
> >DSM modifications to apache.
>
> Look at mod_mime. You should try to make your module work with
> mod_mime rather than duplicating the functionality if possible.
>
> Tony.
> --
> en oeccget g mtcaa f.a.n.finch
> v spdlkishrhtewe y dot@dotat.at
> eatp o v eiti i d. fanf@covalent.net
Is there any documentation available for mod_mime? Also, i would still
like to know how r->content_type is set if possible.
Thank you for replying so quickly.
Thanks,
Jas
Re: r->content_type
Posted by "Jaswinder S. Ahluwalia" <ja...@cs.ucr.edu>.
Tony Finch wrote:
> "Jaswinder S. Ahluwalia" <ja...@cs.ucr.edu> wrote:
> >
> >Currently, r->content_type is NULL (when sending files from memory) so
> >apache automatically makes it the defaulttype located in httpd.conf.
> >When sending files from disk, the correct content_type is set. I was
> >hoping that someone could help me understand when, where, and how
> >r->content_type is set so that i may implement that code in my
> >DSM modifications to apache.
>
> Look at mod_mime. You should try to make your module work with
> mod_mime rather than duplicating the functionality if possible.
>
> Tony.
> --
> en oeccget g mtcaa f.a.n.finch
> v spdlkishrhtewe y dot@dotat.at
> eatp o v eiti i d. fanf@covalent.net
Actually it looks like that is where r->content_type is set :) in
mod_mime.c. let me know if i'm correct.
let me play with some stuff and see if i can get this working!
thanks again,
Jas
Re: r->content_type
Posted by Tony Finch <do...@dotat.at>.
"Jaswinder S. Ahluwalia" <ja...@cs.ucr.edu> wrote:
>
>Currently, r->content_type is NULL (when sending files from memory) so
>apache automatically makes it the defaulttype located in httpd.conf.
>When sending files from disk, the correct content_type is set. I was
>hoping that someone could help me understand when, where, and how
>r->content_type is set so that i may implement that code in my
>DSM modifications to apache.
Look at mod_mime. You should try to make your module work with
mod_mime rather than duplicating the functionality if possible.
Tony.
--
en oeccget g mtcaa f.a.n.finch
v spdlkishrhtewe y dot@dotat.at
eatp o v eiti i d. fanf@covalent.net