# How to write a module to process http response message body?

**URL:** <https://www.ruby-forum.com/t/how-to-write-a-module-to-process-http-response-message-body/205768>\
**Category:** NGINX\
**Created:** [April 15, 2011, 7:28am UTC](https://www.ruby-forum.com/t/how-to-write-a-module-to-process-http-response-message-body/205768 "2011-04-15T07:28:40Z")\
**Posts on this page:** 2\
**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:** [April 15, 2011, 7:28am UTC](https://www.ruby-forum.com/t/how-to-write-a-module-to-process-http-response-message-body/205768/1 "2011-04-15T07:28:40Z")

</div>

I am a nginx development novice.Now i need to process the http response  
message body.For example , get all numbers in the response html,then  
every number times two and use new number instead of the original  
number. Do I need to write a new http module or use the existing module?  
Which existing module can I imitate?Which function should i foucs on ?

Posted at Nginx Forum:

> **[How to write a module to process http response message body?](https://forum.nginx.org/read.php?2,191422,191422#msg-191422)**
>
> I am a nginx development novice.Now i need to process the http response message body.For example , get all numbers in the response html,then every number times two and use new number instead of the original number. Do I need to write a new http...

---

<div class="post-metadata">

**Author:** ![xinghua\_hi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/67e7ee/32.png) [@xinghua\_hi](https://www.ruby-forum.com/u/xinghua_hi)\
**Post date:** [April 15, 2011, 10:54am UTC](https://www.ruby-forum.com/t/how-to-write-a-module-to-process-http-response-message-body/205768/2 "2011-04-15T10:54:27Z")

</div>

What about to use the substitutions module(  
[http://wiki.nginx.org/NginxHttpSubsModule](http://wiki.nginx.org/NginxHttpSubsModule))? You will not get very good  
performance I think.

2011/4/15 xinghua\_hi [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
