search

Home  >  Q&A  >  body text

python - django里使用requests请求问题

就是在django的view.py里get请求http://www.toutiao.com/group/6389732298552082689/
就会很慢,有时直接超时提示:HTTPConnectionPool(host='toutiao.com', port=80): Max retries exceeded with url
而请求其他页面就不会,如果直接脚本执行也不会。
有朋友测试下?

巴扎黑巴扎黑2862 days ago671

reply all(2)I'll reply

  • 高洛峰

    高洛峰2017-04-18 10:23:24

    Look at the process of processing the request to see if there are any time-consuming operations; look at the regular expression matching the URL to see if reDOS will occur when executing something like group/6389732298552082689/.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 10:23:24

    Post the code for analysis

    reply
    0
  • Cancelreply