User login
Navigation
Recent blog posts
- Ubuntu mirrors up and improved!
- Google-jstemplate: Iterate object with unknown properties
- nginx https proxypass for php apps
- sugarcrm & memcache: Doing it Wrong
- subversion and https in Ubuntu Karmic
- Drupal: Views block delta converted to md5 hash
- Ubuntu Server install requires PAE
- Installing Drupal from command line
- Drupal: Handling form field weight through CCK
- minify javascript using Google Closure Compiler
angch's location
angch twitter
- angch: Heading to Brunei. Business class for a change.
- angch: tc qdisc htb activated on the mirror, and mirror reactivated. Hope nothing melts now.
- angch: Hmmm, tbf doesn't work as advertised. htb does. #qos #linux
- angch: @yoonkit me thinks #lucid is a much better tag than #lynx
- angch: Great, you broke the dc's net and they disconnected us. Running to tpm from shah alam
nginx "bug"

angch — Thu, 07/08/2008 - 00:29
http://www.ruby-forum.com/topic/152435
Encountered weird bug when an Ubuntu Hardy apache returns 404 to nginx, nginx will add extra bytes to the content. Bug sounds exactly like described in the above link -- both Apache and nginx added a "Transfer-encoding: chunked" to the content, effectively encoding it twice. Not sure if the fault lies within Apache2's HTTP/1.0 handling of chunked transfer encoding, or nginx, but Igor Sysoev (the creator of nginx) whipped up a quick patch to fix it. "Be liberal in what you accept, and conservative in what you send."
Seems like Ubuntu Hardy's nginx-0.5.33 does not have the hack/patch, and neither does the author's official nginx-0.6.32, so I did
apt-get source nginx
and then grab the original nginx-0.6.32, and applied patched in the forum. dpkg-buildpackage it. Screwed up the proper .deb creation process, and got an nginx_0.5.33-1_amd64.deb instead of nginx_0.6.32-chunkedhack_amd64.deb
dpkg -i installed it just fine though, and the our problem went away.
Attached is the hacked .deb (amd64) It works, but it's a hack. Might do a proper one sometime. Not sure to push upstream though, as even the devel version of nginx doesn't have that patch.
| Attachment | Size |
|---|---|
| nginx_0.5.33-1_amd64.deb | 258.94 KB |
