简体   繁体   English

使用ResponseFile时,如何强制warp使用200以外的状态代码?

[英]How do I force warp to use a status code other than 200 when using ResponseFile?

When trying to produce a custom 404 error, I attempt to respond with responseFile notFound404 [("Content-Type","text/html")] "404.html" Nothing . 当尝试产生自定义404错误时,我尝试使用responseFile notFound404 [("Content-Type","text/html")] "404.html" Nothing进行responseFile notFound404 [("Content-Type","text/html")] "404.html" Nothing However, if "404.html" is present in my filesystem, Warp sends the data with status code 200. 但是,如果我的文件系统中存在“ 404.html”,Warp将发送状态码为200的数据。

Is this behavior expected by servers that support the wai interface? 支持wai接口的服务器是否期望这种行为? If so, why does responseFile have a status argument? 如果是这样,为什么responseFile具有状态参数?

It looks like a bug in Warp. 看起来像是Warp中的错误。 Can you open an issue on the tracker? 您可以在跟踪器上打开问题吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM