[Bug 61189] CGIServlet should be able to set specific environment variables

2017-09-12 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61189

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #6 from Mark Thomas  ---
Thanks for the patches. I like the second one too.

Fixed in:
- trunk for 9.0.0.M27 onwards
- 8.5.x for 8.5.21 onwards
- 8.0.x for 8.0.47 onwards
- 7.0.x for 7.0.82 onwards

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 61189] CGIServlet should be able to set specific environment variables

2017-09-05 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61189

--- Comment #5 from jm009  ---
Created attachment 35297
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35297=edit
Variable name in .

This patch implements your second suggestion.
For the moment it is my preferred one.
It also is the patch that adds the least number of lines of code :-)

First and second patch would be fine for me too :-)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 61189] CGIServlet should be able to set specific environment variables

2017-09-05 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61189

--- Comment #4 from jm009  ---
Created attachment 35296
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35296=edit
All variable declarations in one .

So here is a patch, that would implement your first suggestion.
But, while implementing it, I thought of some inconveniences:

- People may think: Oh, I can put whitespace here, so I will do that somewhere
else too...

(- It is impossible, to put a line break in the variable value, or to put white
space at the beginning or the end of the variable value (its probably not used
very often))

I think I'd prefer your second suggestion...
I'll create a patch for that one too.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 61189] CGIServlet should be able to set specific environment variables

2017-09-05 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61189

Christopher Schultz  changed:

   What|Removed |Added

   Keywords||PatchAvailable

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 61189] CGIServlet should be able to set specific environment variables

2017-09-05 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61189

--- Comment #3 from Christopher Schultz  ---
I don't like the use of unique names that don't have any meaning, like
`environment-variable-N`. Might I suggest one or the other of these schemes:


  environment-variables
  
ENV_VAR_1=foo
ENV_VAR_2=bar
...
  


Or:


environment-variable-ENV_VAR_1
foo


environment-variable-ENV_VAR_2
bar

...


I think I'd prefer the former over the latter.

Second, I think it makes sense to strip whitespace from around the names and
values of the environment variables. Basically, just add ".trim()" to all of
your .substring() calls. This will solve silly problems like people placing
leading/trailing spaces around names/values/equal signs. XML allows a lot of
optional whitespace, and some editors (and humans) like to be verbose.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 61189] CGIServlet should be able to set specific environment variables

2017-09-05 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61189

--- Comment #2 from jm009  ---
Created attachment 35291
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35291=edit
Allow to configure CGI specific environment variables.

This patch makes configuration of additional environment variables similar to
the configuration of executable-arg-1, executable-arg-2, and so on

   
  environment-variable-1
  SQWEBMAIL_MAXARGSIZE=2000
   
   
  nvironment-variable-2
  SQWEBMAIL_MAXATTSIZE=2000
   
   
  nvironment-variable-3
  SQWEBMAIL_MAXMSGSIZE=2000
   

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 61189] CGIServlet should be able to set specific environment variables

2017-06-16 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61189

--- Comment #1 from Konstantin Kolinko  ---
> I don't like to put them in /etc/init.d/tomcat or catalina.sh, because they
> may be lost after a Tomcat update.

The place for custom environment variables in Apache Tomcat is bin/setenv.sh.
This is documented in RUNNING.txt.

http://tomcat.apache.org/tomcat-8.5-doc/RUNNING.txt

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org