【问题标题】:mochiweb: disable headers orderingmochiweb:禁用标题排序
【发布时间】:2015-09-03 11:02:44
【问题描述】:

我检查了 mochiweb 响应标头,它们始终是有序的(降序):

< 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 标头正在使用 erlang gb_tree 进行处理,后来将其转换为列表以便排序。

有没有办法改变这种情况?因为这可以解决(有时)像herehere这样的问题

我的问题是我正在尝试创建一个复制一些请求的服务,并且我正在为此使用 mochiweb,但是正在订购标头,因此它不能完全正确地复制响应。

【问题讨论】:

  • 没有用不同的方法替换mochiweb_headers.erl 中的实现,我认为没有什么好的方法可以做到这一点。

标签: erlang mochiweb


【解决方案1】:

固定在这里:

mochiweb commit 952087e

在响应中格式化标题存在问题,而不是在 mochiweb_headers 中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-21
    • 1970-01-01
    • 2022-10-26
    • 2010-11-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多