1

Made changes as per the documentation. Still the max-uri-length is 2048. Please find my config below.

I have made changes based on this link http://spray.io/documentation/1.1.2/spray-can/configuration/

spray.can {
  server {
    pipelining-limit = 20
    reaping-cycle = infinite
    request-chunk-aggregation-limit = 0
    stats-support = off
    remote-address-header = on
    request-timeout = 2000 s
    idle-timeout = 3000 s
    automatic-back-pressure-handling = on
    parsing {
      max-uri-length             = 4k
      max-response-reason-length = 64
      max-header-name-length     = 64
      max-header-value-length    = 8k
      max-header-count           = 64
      max-content-length         = 512m
      max-chunk-ext-length       = 512
      max-chunk-size             = 4m
      illegal-header-warnings    = off
    }
  }
  client {
    max-connections = 150
    max-retries = 5
    response-chunk-aggregation-limit = 1m
    parsing {
      max-uri-length             = 4k
      max-response-reason-length = 64
      max-header-name-length     = 64
      max-header-value-length    = 8k
      max-header-count           = 64
      max-content-length         = 512m
      max-chunk-ext-length       = 512
      max-chunk-size             = 4m
      illegal-header-warnings    = off
    }
  }
  parsing {
    uri-parsing-mode = relaxed
    max-uri-length             = 4k
    max-response-reason-length = 64
    max-header-name-length     = 64
    max-header-value-length    = 8k
    max-header-count           = 64
    max-content-length         = 512m
    max-chunk-ext-length       = 512
    max-chunk-size             = 4m
    illegal-header-warnings    = off
  }
}

Can someone help me here please. Thanks in advance.

Temerario
  • 53
  • 1
  • 9
  • Did you override `spray.can.server.parsing.max-uri-length` and `client` to your specified value in your `src/main/resources/application.conf`? I suggest actually printing that value at run-time to verify it's `2048`. Also, why do you say `Still the max-uri-length is 2048.`? – Kevin Meredith Jul 27 '16 at 19:49
  • I have overridden the spray.can.server.parsing.max-uri-length and client in application.conf with 4k as mentioned above. But when I'm printing the same value on application start up(ServerSettings(cfg).parserSettings.maxUriLength), it is printing 2048 instead of 4k – Temerario Jul 27 '16 at 20:12
  • Check out this comment on how to override - https://github.com/spray/spray/blob/76ab89c25ce6d4ff2c4b286efcc92ee02ced6eff/spray-can/src/main/resources/reference.conf#L313-L320. I don't entirely understand what to do (since I briefly read it), but it seems relevant to your issue. – Kevin Meredith Jul 27 '16 at 20:26
  • @KevinMeredith I read the same comment and followed whatever it was mentioned there. But its not working. – Temerario Jul 27 '16 at 20:35

0 Answers0