nikoo
V2EX  ›  问与答

Jetty 9 下一个 html 文件把浏览器卡死的问题

  •  
  •   nikoo · May 4, 2018 · 964 views
    This topic created in 2957 days ago, the information mentioned may be changed or developed.
    https://www.eclipse.org/jetty/download.html 下载最新版本 jetty-distribution-9.4.9.v20180320.zip

    $ cd demo-base
    $ java -jar ../start.jar
    启动 demo-base

    在 /demo-base/webapps/ROOT/ 建立测试文件 a.html
    <form action="a.html" method="post" enctype="multipart/form-data">
    <input type="file" name="file" size="50">
    <input type="submit" value="Upload File">
    </form>

    访问 http://127.0.0.1:8080/a.html

    选择一个 2、3M 的文件点 Upload File 即可成功将客户端浏览器卡死,一直显示
    Uploading(19%)...

    大约几十分钟后浏览器显示"This site can ’ t be reached"
    从始至终 Jetty 后台无任何报错

    已测试解决方法:
    1、并非 a.html 中 form 提交至本页 action="a.html"导致,即使改为 action="b.html",同时建立空文件 b.html 也是一样的
    2、已在 Jetty.xml 中加入配置参数
    <Call name="setAttribute">
    <Arg>org.eclipse.jetty.server.Request.maxFormContentSize</Arg>
    <Arg>-1</Arg>
    </Call>
    错误依旧

    请问是否有遇到这种上传问题的?谢谢!
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3209 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 55ms · UTC 12:38 · PVG 20:38 · LAX 05:38 · JFK 08:38
    ♥ Do have faith in what you're doing.