My Oracle Support Banner

Why are Hyphens in Headers Replaced with Underscores by Oracle HTTP Server When Passed to CGI (Doc ID 2458215.1)

Last updated on AUGUST 25, 2023

Applies to:

Oracle HTTP Server - Version to [Release Oracle11g to 12c]
Information in this document applies to any platform.


Explain why HTTP Request Headers containing hyphen are replaced with underscore when displayed as CGI environment variables. 

For example when Oracle HTTP Server (OHS) receives Header TEST-ORACLE the header is changed to TEST_ORACLE.  This can be observed by displaying headers using CGI/Perl script.  Following is printenv script saved in <DocumentRoot>/cgi-bin directory

Displaying headers using URL http://<HOSTNAME.DOMAIN>:<PORT>/cgi-bin/printenv shows following result.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.