# Tengine-1.2.2

**URL:** <https://www.ruby-forum.com/t/tengine-1-2-2/215677>\
**Category:** NGINX\
**Created:** [January 12, 2012, 4:35pm UTC](https://www.ruby-forum.com/t/tengine-1-2-2/215677 "2012-01-12T16:35:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [January 12, 2012, 4:35pm UTC](https://www.ruby-forum.com/t/tengine-1-2-2/215677/1 "2012-01-12T16:35:31Z")

</div>

Hi,

We are pleased to announce that Tengine-1.2.2 has been released. And you  
can download it here: [http://tengine.taobao.org/download/tengine.tar.gz](http://tengine.taobao.org/download/tengine.tar.gz)  
(For those who don’t know Tengine, it is a distribution of Nginx,  
including  
quite a few useful patches and modules developed by a group software  
engineers from Taobao)

In this release, we introduced the ‘input body filter’ mechanism. So  
it’s  
very handy to a developer who wants to write a Web Application Firewall.  
We  
merged the changes from the latest stable Nginx, i.e. Tengine is based  
on  
Nginx-1.0.11 now. There are also some bug fixes in this release. More  
detailed changelog is available at

> **[ChangeLog](http://tengine.taobao.org/changelog.html)**
>
> Tengine-3.0.0 \[21 Jul 2023\]Feature: dynamically reconfigure the servers, locations and upstreams without reloading or restarting worker processes \[tengine-ingress\] (drawing, lianglli)Feature: HTTP/3 s

Have fun, folks!

Regards,

---

<div class="post-metadata">

**Author:** ![Joshua\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ccd318/32.png) [@Joshua\_Z](https://www.ruby-forum.com/u/Joshua_Z)\
**Post date:** [January 12, 2012, 7:40pm UTC](https://www.ruby-forum.com/t/tengine-1-2-2/215677/2 "2012-01-12T19:40:43Z")

</div>

Good stuff! The following feature caught my eye, but I didn’t notice  
any documentation / samples (though I might have missed them). Is this  
feature-set present in 1.2.2?

-Combines multiple CSS or JavasScript requests into one request to  
reduce the downloading time

Side note, the Server header on [tengine.taobao.org](http://tengine.taobao.org) is ‘Apache’. Say  
what!?! 🙂

From: removed\_email\_address@domain.invalid [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf  
Of Joshua Z.  
Sent: Thursday, January 12, 2012 7:35 AM  
To: removed\_email\_address@domain.invalid  
Subject: [ANNOUNCE] Tengine-1.2.2

Hi,

We are pleased to announce that Tengine-1.2.2 has been released. And you  
can download it here: [http://tengine.taobao.org/download/tengine.tar.gz](http://tengine.taobao.org/download/tengine.tar.gz)  
(For those who don’t know Tengine, it is a distribution of Nginx,  
including quite a few useful patches and modules developed by a group  
software engineers from Taobao)

In this release, we introduced the ‘input body filter’ mechanism. So  
it’s very handy to a developer who wants to write a Web Application  
Firewall. We merged the changes from the latest stable Nginx, i.e.  
Tengine is based on Nginx-1.0.11 now. There are also some bug fixes in  
this release. More detailed changelog is available at

> **[ChangeLog](http://tengine.taobao.org/changelog.html)**
>
> Tengine-2.3.3 \[25 Mar 2021\]Feature: tengine supports dtlsv1 and dtlsv1.2. (mrpre)Feature: prometheus format and additional json properties was added to ngx\_http\_upstream\_check\_module. (dkrutsko)Featur

Have fun, folks!

Regards,

---

<div class="post-metadata">

**Author:** ![Joshua\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ccd318/32.png) [@Joshua\_Z](https://www.ruby-forum.com/u/Joshua_Z)\
**Post date:** [January 12, 2012, 7:46pm UTC](https://www.ruby-forum.com/t/tengine-1-2-2/215677/3 "2012-01-12T19:46:20Z")

</div>

On 12 Jan 2012 18h39 WET, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Good stuff! The following feature caught my eye, but I didn’t  
> notice any documentation / samples (though I might have missed  
> them). Is this feature-set present in 1.2.2?
> 
> -Combines multiple CSS or JavasScript requests into one request to  
> reduce the downloading time

I’ve ripped this module from tengine you can grab it here (I haven’t  
checked the new release of tengine for updates to this module) Joshua  
was kind enough to help me get the examples in the README:

> **[GitHub - perusio/nginx-http-concat: A Nginx module for concatenating files in a given...](https://github.com/perusio/nginx-http-concat)**
>
> A Nginx module for concatenating files in a given context: CSS and JS files usually

— appa

---

<div class="post-metadata">

**Author:** ![Joshua\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ccd318/32.png) [@Joshua\_Z](https://www.ruby-forum.com/u/Joshua_Z)\
**Post date:** [January 12, 2012, 7:54pm UTC](https://www.ruby-forum.com/t/tengine-1-2-2/215677/4 "2012-01-12T19:54:21Z")

</div>

Hi,

> [GitHub - perusio/nginx-http-concat: A Nginx module for concatenating files in a given context: CSS and JS files usually · GitHub](https://github.com/perusio/nginx-http-concat)

It doesn’t have license.

Best regards,  
Piotr S. \< [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) \>

---

<div class="post-metadata">

**Author:** ![Joshua\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ccd318/32.png) [@Joshua\_Z](https://www.ruby-forum.com/u/Joshua_Z)\
**Post date:** [January 17, 2012, 11:13am UTC](https://www.ruby-forum.com/t/tengine-1-2-2/215677/5 "2012-01-17T11:13:56Z")

</div>

Hi,

On Thu, Jan 12, 2012 at 11:35 PM, Joshua Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> merged the changes from the latest stable Nginx, i.e. Tengine is based on  
> Nginx-1.0.11 now. There are also some bug fixes in this release. More  
> detailed changelog is available at  
> [ChangeLog - The Tengine Web Server](http://tengine.taobao.org/changelog.html)

I’ve written a post about how to use this ‘input body filter’ to develop  
Web Application Firewalls, taking a _naive_ module to fight hash  
collision  
DoS attacks as an example:  
[http://blog.zhuzhaoyuan.com/2012/01/a-mechanism-to-help-write-web-application-firewalls-for-nginx/](http://blog.zhuzhaoyuan.com/2012/01/a-mechanism-to-help-write-web-application-firewalls-for-nginx/)

Regards,

---

<div class="post-metadata">

**Author:** ![Joshua\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ccd318/32.png) [@Joshua\_Z](https://www.ruby-forum.com/u/Joshua_Z)\
**Post date:** [January 12, 2012, 9:28pm UTC](https://www.ruby-forum.com/t/tengine-1-2-2/215677/6 "2012-01-12T21:28:31Z")

</div>

On 12 Jan 2012 18h53 WET, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi,
> 
> > [GitHub - perusio/nginx-http-concat: A Nginx module for concatenating files in a given context: CSS and JS files usually · GitHub](https://github.com/perusio/nginx-http-concat)
> 
> It doesn’t have license.

Yes indeed. Fixed now.

Thanks,

— appa

---

<div class="post-metadata">

**Author:** ![Joshua\_Z](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ccd318/32.png) [@Joshua\_Z](https://www.ruby-forum.com/u/Joshua_Z)\
**Post date:** [January 24, 2012, 7:05pm UTC](https://www.ruby-forum.com/t/tengine-1-2-2/215677/7 "2012-01-24T19:05:59Z")

</div>

Hello,

Joshua Z., I find http-concat module very useful indeed. Except there  
are a few minor issues that hopefully will be fixed in the new  
version(s):

1. It is not possible to define files from alternate folder followed by  
files defined by another folder, for example:

/jquery/??jquery.asmselect.css,ui.imageuploader.css,jquery.linkselect.css  
=\> works

but

/jquery/??jquery.asmselect.css,ui.imageuploader.css,jquery.linkselect.css,/site-default.css  
=\> doesn’t work

(site-default.css resides in the root)

Suggestion is therefore if “/” is used as a prefix for consequent files,  
then treat this component as absolute URL

1. Some CSS files may contain relative links to images. However, when  
these CSS files are concatenated using http-concat from a page residing  
in a different folder, links to images will not of course work anymore,  
as they become relative to the current page. For example:  
“jquery-ui-1.8.17.custom.css” of the standard jquery library contains 8  
links to images/\* and of course they don’t work.

We wrote our own PHP script to automatically parse CSS files and fix the  
url’s by using the following perl regex:

$path = dirname($e[‘uri’]);  
// example: url(relative/path/to/file) becomes:  
url(/absolute/and/not/relative/path/to/file) within a CSS file  
$buf =  
preg\_replace(‘/(:?\s_url\s_()['“\s]_([^/'"]._)['”\s]\*)/isU’, ‘$1’  
. ($path == ‘/’ ? ‘/’ : $path . ‘/’) . ‘$2)’, $buf);

It doesn’t seem to create a big processing overhead, since the files are  
read from disk anyway, and this only does a replace operation in the  
memory buffer. what do you say? would it be possible to implement?

Also, Antonio, you did a great job to distribute http-concat on git, but  
the link to download the archive does not appear to have a .gz/.zip  
extension, and, for example, in Gentoo distribution it creates problems  
when using “unpack()” function in its ebuilds, as it doesn’t know what  
type of archive it is:

[https://nodeload.github.com/perusio/nginx-http-concat/tarball/master](https://nodeload.github.com/perusio/nginx-http-concat/tarball/master)

(doesn’t end with “.gz”)

Also, there is no version information.

Best regards

Andrejs

Posted at Nginx Forum:

> **[Re: \[ANNOUNCE\] Tengine-1.2.2](https://forum.nginx.org/read.php?2,221087,221584#msg-221584)**
>
> Hi, We are pleased to announce that Tengine-1.2.2 has been released. And you can download it here: http://tengine.taobao.org/download/tengine.tar.gz (For those who don't know Tengine, it is a distribution of Nginx, including quite a few useful...
