# HTTP Headers

**URL:** <https://www.ruby-forum.com/t/http-headers/200078>\
**Category:** NGINX\
**Created:** [December 4, 2010, 7:53am UTC](https://www.ruby-forum.com/t/http-headers/200078 "2010-12-04T07:53:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Post date:** [December 4, 2010, 7:53am UTC](https://www.ruby-forum.com/t/http-headers/200078/1 "2010-12-04T07:53:24Z")

</div>

Hi,

Is there a way to sort HTTP headers alphabetically? Im a control freak.

Posted at Nginx Forum:

> **[HTTP Headers](https://forum.nginx.org/read.php?2,155473,155473#msg-155473)**
>
> Hi, Is there a way to sort HTTP headers alphabetically? Im a control freak.

---

<div class="post-metadata">

**Author:** ![ControlFreaq](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e47c2d/32.png) [@ControlFreaq](https://www.ruby-forum.com/u/ControlFreaq)\
**Post date:** [December 4, 2010, 8:57am UTC](https://www.ruby-forum.com/t/http-headers/200078/2 "2010-12-04T08:57:47Z")

</div>

On Sat, Dec 4, 2010 at 06:52, ControlFreaq [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi,
> 
> Is there a way to sort HTTP headers alphabetically? Im a control freak.

Indeed… There are modules to add/remove headers, you could remove  
all and add in order…?

HTH,  
Nuno

–  
Mars 2 Stay!

> **[Golden Hammer](https://xkcd.com/801/)**

/etc

---

<div class="post-metadata">

**Author:** ![ControlFreaq](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e47c2d/32.png) [@ControlFreaq](https://www.ruby-forum.com/u/ControlFreaq)\
**Post date:** [December 4, 2010, 9:20pm UTC](https://www.ruby-forum.com/t/http-headers/200078/3 "2010-12-04T21:20:56Z")

</div>

On 4 Dez 2010 06h52 WET, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi,
> 
> Is there a way to sort HTTP headers alphabetically? Im a control  
> freak.

Yes. There are several lines of attack for that. My first bet would be  
in the embedded Perl or Lua modules for sorting the headers  
alphabetically.

— appa
