# Possible bug? https return truncated when use default proxy buffer size

**URL:** <https://www.ruby-forum.com/t/possible-bug-https-return-truncated-when-use-default-proxy-buffer-size/180417>\
**Category:** NGINX\
**Created:** [December 19, 2009, 3:25pm UTC](https://www.ruby-forum.com/t/possible-bug-https-return-truncated-when-use-default-proxy-buffer-size/180417 "2009-12-19T15:25:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 19, 2009, 3:25pm UTC](https://www.ruby-forum.com/t/possible-bug-https-return-truncated-when-use-default-proxy-buffer-size/180417/1 "2009-12-19T15:25:32Z")

</div>

Here is the problem I found out.

Front-End https Conf:  
server {  
listen 443;  
…  
location / {  
proxy\_pass [http://backend](http://backend);  
proxy\_set\_header X-Forwarded-For  
$proxy\_add\_x\_forwarded\_for;  
proxy\_set\_header Host $http\_host;  
proxy\_redirect off;  
}

```
}

```

* * *

if use default proxy\_buffer\_size (not set it), when backend output  
something bigger than 64k without content-length header. the frontend  
https  
will truncate the output to 64k.

After I set  
proxy\_buffer\_size 1024 4k;

Everything works like normal. Using 0.8.29 .

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 19, 2009, 3:25pm UTC](https://www.ruby-forum.com/t/possible-bug-https-return-truncated-when-use-default-proxy-buffer-size/180417/2 "2009-12-19T15:25:32Z")

</div>

On Sun, Dec 06, 2009 at 12:42:30PM +0800, tOmasEn wrote:

> ```
> proxy_set_header Host $http_host;
> 
> ```
> 
> After I set  
> proxy\_buffer\_size 1024 4k;
> 
> Everything works like normal. Using 0.8.29 .

What is in error\_log ?

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 19, 2009, 3:25pm UTC](https://www.ruby-forum.com/t/possible-bug-https-return-truncated-when-use-default-proxy-buffer-size/180417/3 "2009-12-19T15:25:32Z")

</div>

after reading error log. the reason apears to be Permission denied for  
proxy\_temp directory.

Sorry for your time.
