mochiweb:禁用 headers 排序

mochiweb: disable headers ordering

我检查了 mochiweb 响应 headers,它们总是有序的(降序):

< Server: MochiWeb/1.0 (Any of you quaids got a smint?)
< last-modified: Sun, 30 Aug 2015 23:13:04 GMT
< Date: Sun, 30 Aug 2015 23:15:15 GMT
< Content-Type: text/html
< Content-Length: 89

这看起来是因为 mochiweb headers 正在使用 erlang gb_tree 进行处理,后者后来被转换为列表,因此它是有序的。

有办法改变吗?因为这可以解决问题(有时),例如 here and here

我的问题是,我正在尝试创建一个复制某些请求的服务,为此我正在使用 mochiweb,但是 Headers 正在被订购,所以它没有完全正确地复制响应。

已修复:

mochiweb commit 952087e

格式化响应中的 headers 存在问题,而不是 mochiweb_headers