title: Increase max-content-length in spray-can
body: <p>I try to increase the max-content-length so that large files can be uploaded to the server.</p>
  
  <p>I have added this to <code>application.conf</code></p>
  
  <pre><code>spray.can {
    server {
      parsing {
        max-content-length = 2g
        max-chunk-size = 10m
      }
    }
  }
  </code></pre>
  
  <p>However the cap seems to still be at 1MB.
  I can confirm that the parameters are read, as I can lower the cap and it will take effect.</p>
  
  <p>The application triggers a response error (<code>413 Request Entity Too Large</code>), I have a HttpService (accepting CORS) and a route looking like this:</p>
  
  <pre><code>val contentRoute =
    cors {
      pathPrefix(PROJECTS) {
        (post &amp; path(Segment / CONTENT)) { (projectId) =&gt;
          post {
            entity(as[MultipartFormData]) { data =&gt;
              complete(StatusCodes.OK)
            }
          }
        }
      }
    }
  </code></pre>
  
  <p>Could there be some other preference that I also need to adjust, that is also set to 1MB by default?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>These are the dependency versions:</p>
  
  <pre><code>libraryDependencies ++= {
    val akkaV = "2.3.9"
    val sprayV = "1.3.3"
    Seq(
      "io.spray"            %%  "spray-can"     % sprayV,
      "io.spray"            %%  "spray-routing" % sprayV,
      "io.spray"            %%  "spray-json"    % "1.3.2",
      "io.spray"            %%  "spray-testkit" % sprayV  % "test",
      "com.typesafe.akka"   %%  "akka-actor"    % akkaV,
      "com.typesafe.akka"   %%  "akka-testkit"  % akkaV   % "test",
      "org.specs2"          %%  "specs2-core"   % "2.3.11" % "test",
      "org.mongodb"         %%  "casbah"        % "2.8.2"
    )
  }
  </code></pre>