I have this inherit problem too. (explain below)

Is it possible config "max request" sub domain independence?

Thanks.

https://marc.info/?l=openbsd-misc&m=144080241519699&w=2

---------------------------------------------------------------------
There seems to be an inherit problem with httpd.conf.

Say you have two servers:

server "foo.net" {
  listen on egress port 80
  root "/foo_net"
  ...
  Other options here
  ...
}

server "bar.foo.net" {
  listen on egress port 80
  root "/bar_foo_net"

  connection { max request body 8388608 }
}

When httpd.conf parses this config, it believes "foo.net" is the "parent". But since "foo.net" has no connection { max request body xxxx } parameter,
it uses the #define SERVER_MAXREQUESTBODY value which is 1048576.

However, if you add "connection { max request body 8388608 }" to the
server "foo.net" stanza, all of the sudden the max request body works
for "bar.foo.net".. however, if will ONLY use what "foo.net" has.
You can't override it with a different value for "bar.foo.net".

I believe this is down to the behavior in config.c, line 454, in function
config_getserver_config:

srv_conf->maxrequestbody = parent->maxrequestbody;

It is always set to the parent's maxrequestbody.

Is this by design?

Thanks,
Tom
--------------------------------------------------------------------

--
Key fingerprint: CDB3 6C62 254B C088 1E5D DD32 182C 97DB CF2C 80AC

Attachment: 0xCF2C80AC.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to