zoukankan      html  css  js  c++  java
  • 413 Request Entity Too Large 异常记录

    在进行svn update时,总是出现如下异常:
    svn: Server sent unexpected return value (413 Request Entity Too Large) in response to REPORT request for '/svn/!svn/vcc/default'

    “413 Request Entity Too Large”是由web server发出来的,表示HTTP请求中的内容太大,撑爆掉了。
    我的Web Server是“Apache Http”,所以需要在httpd.conf中加入如下配置:
    LimitXMLRequestBody 0
    LimitRequestBody 0

    参照:http://httpd.apache.org/docs/2.2/mod/core.html#limitxmlrequestbody

    LimitXMLRequestBody Directive

    Description: Limits the size of an XML-based request body
    Syntax: LimitXMLRequestBody bytes
    Default: LimitXMLRequestBody 1000000
    Context: server config, virtual host, directory, .htaccess
    Override: All
    Status: Core
    Module: core

    Limit (in bytes) on maximum size of an XML-based request body. A value of 0 will disable any checking.

    Example:

    LimitXMLRequestBody 0

    LimitRequestBody Directive

    Description: Restricts the total size of the HTTP request body sent from the client
    Syntax: LimitRequestBody bytes
    Default: LimitRequestBody 0
    Context: server config, virtual host, directory, .htaccess
    Override: All
    Status: Core
    Module: core

    This directive specifies the number of bytes from 0 (meaning unlimited) to 2147483647 (2GB) that are allowed in a request body.

    The LimitRequestBody directive allows the user to set a limit on the allowed size of an HTTP request message body within the context in which the directive is given (server, per-directory, per-file or per-location). If the client request exceeds that limit, the server will return an error response instead of servicing the request. The size of a normal request message body will vary greatly depending on the nature of the resource and the methods allowed on that resource. CGI scripts typically use the message body for retrieving form information. Implementations of the PUT method will require a value at least as large as any representation that the server wishes to accept for that resource.

    This directive gives the server administrator greater control over abnormal client request behavior, which may be useful for avoiding some forms of denial-of-service attacks.

    If, for example, you are permitting file upload to a particular location, and wish to limit the size of the uploaded file to 100K, you might use the following directive:

    LimitRequestBody 102400

    Note: not applicable to proxy requests.

     

  • 相关阅读:
    swagger多个分组代码展示
    rabbitMQ基本概念
    谈谈微信支付曝出的漏洞
    谈谈离职和跳槽
    一个著名的任务调度系统是怎么设计的?
    BAT等公司必问的8道Java经典面试题,你都会了吗?
    从世界杯竞猜骗局谈二分法
    Spring4+Spring MVC+MyBatis整合思路
    十张图让你了解阿里公司架构设计的发展变化史
    一位00后程序员的成长历程
  • 原文地址:https://www.cnblogs.com/zhangqingsh/p/3083038.html
Copyright © 2011-2022 走看看