gpt4 book ai didi

libraries - ReSTLet 框架 - 编辑 agent.properties 文件

转载 作者:行者123 更新时间:2023-12-01 13:00:39 25 4
gpt4 key购买 nike

我正在使用ClientInfo class从 RESTlet 从客户端使用的浏览器获取用户代理。

它工作正常,但有点过时(新的 Opera 被检测为 Chrome,等等...),所以我想手动将模板插入到 agent.properties 文件中。问题是我不知道 agent.properties 文件在哪里。我只有 RESTlet 的 jar 文件。

上面的链接显示:

Restlet users has the ability to define their own way to extract data from the "user-agent" header. It is based on a list of templates declared in a file called "agent.properties" and located in the classpath in the sub directory "org/restlet/data".

有人知道 agent.properties 文件在哪里吗?

最佳答案

它位于 2.2 版本的核心 ReSTLet 库 jar (org.reSTLet) 中,与 ClientInfo 类位于同一包中。我还没有检查过 2.0,但我怀疑它仍然存在。

主副本的 github 位置当前位于 https://github.com/restlet/restlet-framework-java/blob/master/modules/org.restlet/src/org/restlet/data/agent.properties我确信处理升级的浏览器版本的补丁会受到欢迎。

关于libraries - ReSTLet 框架 - 编辑 agent.properties 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23537978/

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