gpt4 book ai didi

anchor - 在 werkzeug 请求中检索 url anchor

转载 作者:行者123 更新时间:2023-12-03 15:28:24 25 4
gpt4 key购买 nike

我有一个 DAV 协议(protocol),它将带外数据存储在 url anchor 中,例如ghiDELETE /abc.def#ghi .服务器是一个 Flask 应用程序。

我可以看到请求通过 tcpdump 在线发送。 ,但是当我查看 werkzeug 请求对象(例如 url() 或 base_url())时,我得到的只是 /abc.def . #ghi已被剥离。

是否有返回此信息的方法,或者我是否必须将 Request 子类化才能自己处理?如果是这样,有没有我可以作为灵感的例子?

最佳答案

来自维基百科( Fragment Identifier )(没有时间在 RFC 中找到它):

The fragment identifier functions differently than the rest of the URI: namely, its processing is exclusively client-side with no participation from the server



因此 Flask - 或任何其他框架 - 无权访问 #ghi .

关于anchor - 在 werkzeug 请求中检索 url anchor ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7597603/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com