nrmmota / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

the section "document_root" can contain at most 35 arguments while there is no such limitation when arguments are passed to "-r" on commandline. #290

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. put the following string in mongoose.conf:
document_root 
.,/0.dat=e.dat,/1.dat=e.dat,/2.dat=e.dat,/3.dat=e.dat,/4.dat=e.dat,/5.dat=e.dat,
/6.dat=e.dat,/7.dat=e.dat,/8.dat=e.dat,/9.dat=e.dat,/10.dat=e.dat,/11.dat=e.dat,
/12.dat=e.dat,/13.dat=e.dat,/14.dat=e.dat,/15.dat=e.dat,/16.dat=e.dat,/17.dat=e.
dat,/18.dat=e.dat,/19.dat=e.dat,/20.dat=e.dat,/21.dat=e.dat,/22.dat=e.dat,/23.da
t=e.dat,/24.dat=e.dat,/25.dat=e.dat,/26.dat=e.dat,/27.dat=e.dat,/28.dat=e.dat,/2
9.dat=e.dat,/30.dat=e.dat,/31.dat=e.dat,/32.dat=e.dat,/33.dat=e.dat,/34.dat=e.da
t,/35.dat=e.dat

2. relaunch the app and it says the line is invalid
3. put the following line instead:
document_root 
.,/0.dat=e.dat,/1.dat=e.dat,/2.dat=e.dat,/3.dat=e.dat,/4.dat=e.dat,/5.dat=e.dat,
/6.dat=e.dat,/7.dat=e.dat,/8.dat=e.dat,/9.dat=e.dat,/10.dat=e.dat,/11.dat=e.dat,
/12.dat=e.dat,/13.dat=e.dat,/14.dat=e.dat,/15.dat=e.dat,/16.dat=e.dat,/17.dat=e.
dat,/18.dat=e.dat,/19.dat=e.dat,/20.dat=e.dat,/21.dat=e.dat,/22.dat=e.dat,/23.da
t=e.dat,/24.dat=e.dat,/25.dat=e.dat,/26.dat=e.dat,/27.dat=e.dat,/28.dat=e.dat,/2
9.dat=e.dat,/30.dat=e.dat,/31.dat=e.dat,/32.dat=e.dat,/33.dat=e.dat

4.relaunch and it works

What version of the product are you using? On what operating system?
3.0 on windows xp

Please provide any additional information below.

It may not be a big problem since we can always pass arguments via commandline 
but it would be more pleasant for users who prefer .conf file if the limitation 
is dissolved.

Original issue reported on code.google.com by jwg...@googlemail.com on 31 Oct 2011 at 7:25

GoogleCodeExporter commented 9 years ago
This is because of the config line size limit of 512 characters. Take a look at 
main.c:

static void process_command_line_arguments(char *argv[], char **options) {
  char line[512], opt[512], val[512], *p;

I've changed it to 8192 bytes instead,
https://code.google.com/p/mongoose/source/detail?r=77615121d235b5e703a3e2692e1b5
e67ebb0dd8f

Original comment by valenok on 31 Oct 2011 at 11:16