# Nginx-1.3.14

**URL:** <https://www.ruby-forum.com/t/nginx-1-3-14/227143>\
**Category:** NGINX\
**Created:** [March 5, 2013, 3:56pm UTC](https://www.ruby-forum.com/t/nginx-1-3-14/227143 "2013-03-05T15:56:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maxim\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/da6949/32.png) [@Maxim\_D](https://www.ruby-forum.com/u/Maxim_D)\
**Post date:** [March 5, 2013, 3:56pm UTC](https://www.ruby-forum.com/t/nginx-1-3-14/227143/1 "2013-03-05T15:56:31Z")

</div>

Changes with nginx 1.3.14 05 Mar  
2013

```
*) Feature: $connections_active, $connections_reading, and
   $connections_writing variables in the 

```

ngx\_http\_stub\_status\_module.

```
*) Feature: support of WebSocket connections in the
   ngx_http_uwsgi_module and ngx_http_scgi_module.

*) Bugfix: in virtual servers handling with SNI.

*) Bugfix: new sessions were not always stored if the 

```

“ssl\_session\_cache  
shared” directive was used and there was no free space in shared  
memory.  
Thanks to Piotr S…

```
*) Bugfix: multiple X-Forwarded-For headers were handled 

```

incorrectly.  
Thanks to Neal Poole for sponsoring this work.

```
*) Bugfix: in the ngx_http_mp4_module.
   Thanks to Gernot Vormayr.

```

–  
Maxim D.  
[http://nginx.org/en/donation.html](http://nginx.org/en/donation.html)

---

<div class="post-metadata">

**Author:** ![Maxim\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/da6949/32.png) [@Maxim\_D](https://www.ruby-forum.com/u/Maxim_D)\
**Post date:** [March 7, 2013, 2:39am UTC](https://www.ruby-forum.com/t/nginx-1-3-14/227143/2 "2013-03-07T02:39:29Z")

</div>

Hello Nginx U.s,

Now available: Nginx 1.3.14 For Windows [Nginx 1.3.14 for Windows – Kevin Worthington](http://goo.gl/WFaWC) (32-bit and  
64-bit versions)

These versions are to support legacy users who are already using Cygwin  
based builds of Nginx. Officially supported native Windows binaries are  
at  
[nginx.org](http://nginx.org).

Announcements are also available via my Twitter stream (  
[http://twitter.com/kworthington](http://twitter.com/kworthington)), if you prefer to receive updates that  
way.

## Thank you, Kevin

Kevin W.  
kworthington _@_ (gmail] [dot} {com)

> **[Kevin Worthington](https://kevinworthington.com/)**
>
> Practical Tech Guides, Troubleshooting, and Insights on the Modern Internet

[http://twitter.com/kworthington](http://twitter.com/kworthington)

---

<div class="post-metadata">

**Author:** ![Maxim\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/da6949/32.png) [@Maxim\_D](https://www.ruby-forum.com/u/Maxim_D)\
**Post date:** [March 13, 2013, 3:40pm UTC](https://www.ruby-forum.com/t/nginx-1-3-14/227143/3 "2013-03-13T15:40:17Z")

</div>

On 13 March 2013 14:15, AJ Weber [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is there a way to leave my default caching enabled, but tell nginx to NOT  
> cache zero-byte results? If the correct content is available in the cache,  
> I want it returned without going to the back end, but in my case (at least),  
> a zero-byte result for a status=200 is not valid.

It looks to me like

> **[Module ngx\_http\_proxy\_module](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_no_cache)**
>
> The ngx\_http\_proxy\_module module allows passing requests to another server.

is what you need to use.  
If the backend is returning a Content-Length header, you could refer  
to that. If not, you may have to get creative in assembling a map{}  
variable.

FWIW, a 200 with an empty body is, (I believe) invalid. It should be a  
204. If your backend is misbehaving, you might like to fix it before  
mitigating the problem inside your reverse-proxy. Remember: broken  
gets fixed, but shitty lives forever …

## Jonathan

Jonathan M. // Oxford, London, UK

> **[Jonathan Matthews :: Words Typed, Great Rates For Cash](https://www.jpluscplusm.com)**

---

<div class="post-metadata">

**Author:** ![Maxim\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/da6949/32.png) [@Maxim\_D](https://www.ruby-forum.com/u/Maxim_D)\
**Post date:** [March 13, 2013, 4:06pm UTC](https://www.ruby-forum.com/t/nginx-1-3-14/227143/4 "2013-03-13T16:06:00Z")

</div>

On 3/13/2013 10:40 AM, Jonathan M. wrote:

> It looks to me like  
> [Module ngx\_http\_proxy\_module](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_no_cache)  
> is what you need to use.  
> If the backend is returning a Content-Length header, you could refer  
> to that. If not, you may have to get creative in assembling a map{}  
> variable.  
> I looked at that, but it appears that it only tests for the existence of  
> the variable/header. Content-Length should be there all the time.
> 
> FWIW, a 200 with an empty body is, (I believe) invalid. It should be a  
> 204. If your backend is misbehaving, you might like to fix it before  
> mitigating the problem inside your reverse-proxy. Remember: broken  
> gets fixed, but shitty lives forever …

I tend to agree with you here. Sometimes you can’t open-up the  
application code very easily…but it’s a very fair and valid point.  
I’ll look into it.

Thanks for the reply,  
AJ

---

<div class="post-metadata">

**Author:** ![Maxim\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/da6949/32.png) [@Maxim\_D](https://www.ruby-forum.com/u/Maxim_D)\
**Post date:** [March 13, 2013, 3:19pm UTC](https://www.ruby-forum.com/t/nginx-1-3-14/227143/5 "2013-03-13T15:19:16Z")

</div>

I have a case where a user requires authorization to retrieve content.  
Ngnix correctly returns the tomcat’s 401, and then the user attempts  
authentication.

However, if the user fails to authenticate, tomcat returns a 200 but  
zero bytes returned. This comes through nginx as a cache-miss,  
status=200, 0 bytes returned.

Unfortunately, if the user tries again, even if he/she is successful,  
the 200 result is cached for my 10min cache setting for  
200-results…thus, even a correct login will not return the content for  
at least 10min due to the cached, zero-byte page.

Is there a way to leave my default caching enabled, but tell nginx to  
NOT cache zero-byte results? If the correct content is available in the  
cache, I want it returned without going to the back end, but in my case  
(at least), a zero-byte result for a status=200 is not valid.

Thanks for any tips or tricks!  
-AJ

---

<div class="post-metadata">

**Author:** ![Maxim\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/da6949/32.png) [@Maxim\_D](https://www.ruby-forum.com/u/Maxim_D)\
**Post date:** [March 13, 2013, 4:13pm UTC](https://www.ruby-forum.com/t/nginx-1-3-14/227143/6 "2013-03-13T16:13:01Z")

</div>

On 13 March 2013 15:02, AJ Weber [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > variable.
> 
> I looked at that, but it appears that it only tests for the existence of the  
> variable/header. Content-Length should be there all the time.

The docs I linked to have this to say: “If at least one value of the  
string parameters is not empty and is not equal to “0” then the  
response will not be saved”

So if content-length is always present (and sometimes “0”) I would try  
this:

* * *

## map $upstream\_http\_content\_length $map\_upstream\_cache\_buster { default 0; 0 1; } server { […] proxy\_no\_cache $map\_upstream\_cache\_buster; }

Or something like that; you get the idea.

## Jonathan

Jonathan M. // Oxford, London, UK

> **[Jonathan Matthews :: Words Typed, Great Rates For Cash](https://www.jpluscplusm.com)**
