dousi7919 2015-03-12 15:36
浏览 333

为什么文件上传响应的Content-Type必须是HTML?

I just noticed something today while working on a HTML file upload form. I'm testing my server-side processing function (Image conversion & compression) with a REST Client (Postman in my case).

If PHP sets the response's Content-Type header to application/json, the 200KB response takes around 30 seconds to be processed (after the request has returned), but if I set it to text/html, it's done right away in less than a second after the request is completed.

I'm happy that I can make it work, but my curiosity got the best of me, and now I want to know why HTML Content-Type is required. Anyone knows ?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
    • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
    • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
    • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
    • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
    • ¥15 python爬取bilibili校园招聘网站
    • ¥30 求解达问题(有红包)
    • ¥15 请解包一个pak文件
    • ¥15 不同系统编译兼容问题
    • ¥100 三相直流充电模块对数字电源芯片在物理上它必须具备哪些功能和性能?