one last memcache question

Maxim Dounin mdounin at mdounin.ru
Sun Mar 2 01:50:04 MSK 2008


Hello!

On Sat, Mar 01, 2008 at 03:38:16PM -0500, Sean Allen wrote:

>
> On Mar 1, 2008, at 2:33 PM, Igor Sysoev wrote:
>
>> On Sat, Mar 01, 2008 at 02:27:09PM -0500, Sean Allen wrote:
>>
>>>
>>> On Mar 1, 2008, at 2:02 PM, Igor Sysoev wrote:
>>>
>>>> On Sat, Mar 01, 2008 at 01:38:22PM -0500, Sean Allen wrote:
>>>>
>>>>> or i hope it is the last,
>>>>>
>>>>> right now i have a default_type text/html setup because i cant figure
>>>>> out exactly what need to go before the html we are caching to get it
>>>>> handled properly.
>>>>>
>>>>> full http headers? havent tried that.
>>>>>
>>>>> i put
>>>>>
>>>>> Content-type: text/html\n\n
>>>>>
>>>>> before our html and the browser doesnt recognize as html so obviously
>>>>> that isnt it.
>>>>
>>>> Now nginx does not support headers in memcached, so this line is
>>>> in a response body.
>>>>
>>>
>>> sorry, i don't understand.
>>>
>>> how can i send the proper mime type without setting default_type ?
>>
>> No.
>>
>
> so you can only send one mime type from a memcache via nginx?
>
> you cant serve html and images?

You can, actually. But you have to configure different locations for 
images and html. E.g.

     location /images/ {
         default_type image/gif;
         memcached_pass ...
     }
     location /html/ {
         default_type text/html;
         memcached_pass ...
     }

Maxim Dounin





More information about the nginx mailing list