I'm caching some web pages in memcache. When I read the page directly from the cache, the page is well formed like this ...
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"-:-- 0
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
but when I use a browser or curl to read it from nginx (version 0.8.50), it looks like response headers are ending up in the body of the response like this ...
�{
" ETag"'"16bb9f51667d334aa4e7663ca28d308a""X-Runtime177"Content-Type"text/html; charset=utf-8"Content-Length"5428"Set-Cookie""Cache-Control"(private, max-age=0, must-revalidate"4<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
My nginx config is pretty simple ...
set $memcached_key $cookie__app_session$uri;
memcached_pass localhost:11211;
default_type text/html;
error_page 404 502 /fallback$uri;
Does anyone have an idea why the response is corrupt?