$lucee_context (X-Webserver-Context header) - not working

10 views
Skip to first unread message

egbd7

unread,
Sep 12, 2021, 10:57:31 PM9/12/21
to mod_cfml
if by default mod_cfml uses the X-Tomcat-DocRoot header to generate an md5 hash of the string literal, to label the web context... 
Then what exactly is the purpose and point of X-Webserver-Context?
It doesn't do anything whatsoever. 

Jordan Michaels

unread,
Sep 13, 2021, 12:30:30 AM9/13/21
to mod_cfml
The web context label (the label you see in the Lucee Administrator) is generated internally by Lucee, not mod_cfml.

X-Webserver-Context is what Paul used to provide support for aliases. IE: web contexts that use multiple domain names. Originally, each domain name required its own context, but that was far more memory intensive than it needed to be. By identifying the primary web context of all aliases that come in, Paul made mod_cfml much 'slimmer' by assigning those domains as aliases rather than unique and separate contexts.

You can see its use in code here:

... around line 200.

HTH
-Jordan

Jordan Michaels

unread,
Sep 13, 2021, 12:34:04 AM9/13/21
to mod_cfml
Correction: the web context label may not be generated by Lucee. I honestly don't know what generates it. It could be Lucee or Tomcat or something else entirely. I've never looked into it and always just assumed it was assigned by Lucee.

-Jordan

egbd7

unread,
Sep 14, 2021, 12:45:14 PM9/14/21
to mod_cfml
Ahhh understood. Thank you both very much, that is making a ton more sense now. 
Much appreciated!
Reply all
Reply to author
Forward
0 new messages