-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
js处理请求头信息时大小写问题 #184
Comments
响应的响应头好像也是返回的全小写 |
为了统一都转换成了小写。但在脚本中是可以通过大写开头来获取对应值的,比如 $request.headers.Accept在 2023年9月17日,10:11,ztxtop ***@***.***> 写道:
响应的响应头好像也是返回的全小写
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
了解了,不过响应头都转成小写后,在js脚本中如果添加了首字母大写的响应头,并不会自动转换成小写,这样对于想在脚本中覆盖原有响应头的操作就无效了,目前我遇到的是想覆盖302重定向的Location,因脚本也在surge上使用(surge、qx等工具没有转小写的操作),这就导致需要脚本中作判断了才能正确覆盖响应头了 |
这确实是个问题,我回头研究下怎么处理比较好
|
在js中使用$request.headers获取请求头信息时,目前的新版本返回的都是小写的请求头key(即使原始的请求头是首字母大写的),这可能让后续的一些业务判断无法进行;能否让$request.headers和$response.headers取得的信息跟原请求响应是一致的呢
The text was updated successfully, but these errors were encountered: