# $request\_uri greater than 8 characters causes core dump

**URL:** <https://www.ruby-forum.com/t/request-uri-greater-than-8-characters-causes-core-dump/223702>\
**Category:** NGINX\
**Created:** [October 15, 2012, 1:22am UTC](https://www.ruby-forum.com/t/request-uri-greater-than-8-characters-causes-core-dump/223702 "2012-10-15T01:22:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [October 15, 2012, 1:22am UTC](https://www.ruby-forum.com/t/request-uri-greater-than-8-characters-causes-core-dump/223702/1 "2012-10-15T01:22:37Z")

</div>

Nginx dumps core if the $request\_uri is not found and is more than 8  
characters. For example:

$ GET -Sed [http://localhost/en/12345](http://localhost/en/12345)  
GET [http://localhost/en/12345](http://localhost/en/12345)  
200 OK  
Connection: close  
Date: Sun, 14 Oct 2012 23:13:40 GMT  
Accept-Ranges: bytes  
Server: nginx/1.1.19  
Content-Length: 4464  
Content-Type: text/html  
Last-Modified: Sun, 14 Oct 2012 22:21:45 GMT  
Client-Date: Sun, 14 Oct 2012 23:13:40 GMT  
Client-Peer: 127.0.0.1:80  
Client-Response-Num: 1  
Title: Page Not Found ☹  
X-Meta-Charset: utf-8

$ GET -Sed [http://localhost/en/123456](http://localhost/en/123456)  
GET [http://localhost/en/123456](http://localhost/en/123456)  
500 Server closed connection without sending any data back  
Content-Type: text/plain  
Client-Date: Sun, 14 Oct 2012 23:13:43 GMT  
Client-Warning: Internal response

But a longer $request\_uri that is found is OK. For example:

$ GET -Sed [http://localhost/en/about/index.html](http://localhost/en/about/index.html)  
GET [http://localhost/en/about/index.html](http://localhost/en/about/index.html)  
200 OK  
Connection: close  
Date: Sun, 14 Oct 2012 23:15:20 GMT  
Accept-Ranges: bytes  
Server: nginx/1.1.19  
Content-Length: 3050  
Content-Type: text/html  
Last-Modified: Sun, 14 Oct 2012 19:37:32 GMT  
Client-Date: Sun, 14 Oct 2012 23:15:20 GMT  
Client-Peer: 127.0.0.1:80  
Client-Response-Num: 1  
Title:  
X-Meta-Author:  
X-Meta-Charset: utf-8

This is on Ubuntu 12.04 x86 64-bit with nginx 1.1.19 (the `nginx-light`  
package).

This is my setup:

```
server {
    listen 80;
    server_name localhost;

    root /srv/www/site;
    index index.html;

    error_page 404 = @404;

    location @404 {
        try_files /404.html /404/index.html;
    }

    location ~ ^/(404|css|js|font|img|en|es) {
        try_files $uri $uri/ =404;
    }

    location / {
        rewrite ^ 

```

$scheme://$server\_name:$server\_port/en$request\_uri?  
redirect;  
}  
}

What in the world? Thanks.

-Tom

Posted at Nginx Forum:

> **[$request\_uri greater than 8 characters causes core dump](https://forum.nginx.org/read.php?2,231787,231787#msg-231787)**
>
> Nginx dumps core if the $request\_uri is not found and is more than 8 characters. For example: $ GET -Sed http://localhost/en/12345 GET http://localhost/en/12345 200 OK Connection: close Date: Sun, 14 Oct 2012 23:13:40 GMT Accept-Ranges: bytes

---

<div class="post-metadata">

**Author:** ![tvaughan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@tvaughan](https://www.ruby-forum.com/u/tvaughan)\
**Post date:** [October 15, 2012, 9:41am UTC](https://www.ruby-forum.com/t/request-uri-greater-than-8-characters-causes-core-dump/223702/2 "2012-10-15T09:41:32Z")

</div>

On Monday 15 October 2012 03:21:46 tvaughan wrote:

> Nginx dumps core if the $request\_uri is not found and is more than 8  
> characters. For example:

[…]

> This is on Ubuntu 12.04 x86 64-bit with nginx 1.1.19 (the `nginx-light`  
> package).

[…]

> What in the world? Thanks.

You use an old nginx version from development branch with well-known  
bug.

wbr, Valentin V. Bartenev

–

> **[F5 NGINX: Built for cloud-native apps. Ready for AI traffic.](https://www.f5.com/products/nginx)**
>
> Deliver modern applications with NGINX. Explore high-performance load balancing, API gateways, and web server solutions trusted by top global enterprises.
