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.

     

  • 相关阅读:
    多种开源OLAP引擎测评报告
    Go的单元测试
    C#的List实现IComparer接口排序实例
    Java 多线程:(一)
    android:theme
    android:excludeFromRecents="true"
    RK:主屏幕
    Gatsby xinhua log boork(三)
    RK:Provision.apk、SettingsProvider的分析、使用
    Camera(一):查看Camera设备详细信息
  • 原文地址:https://www.cnblogs.com/zhangqingsh/p/3083038.html
Copyright © 2011-2022 走看看