[openlitespeed] <showVersionNumber>:2

#1
Hello,
in openlitespeed 1.0.4, if I select to "Hide full header" in the server signature setting, i get this warning in the log file:
[WARN] [config:server:basic] invalid value of <showVersionNumber>:2, use default=0

Regards,
Stefano
 

webizen

Well-Known Member
#2
since it is opensource, you can look at the code and figure out.

in src/main/httpserverbuilder.cpp line 3858

change
int sv = getLongValue( pRoot, "showVersionNumber", 0, 1, 0 );
to
int sv = getLongValue( pRoot, "showVersionNumber", 0, 2, 0 );

then recompile.
 
#3
since it is opensource, you can look at the code and figure out.
I don't speak fluently c++; also, as I suppose that is a bug, I'd like to report it.

in src/main/httpserverbuilder.cpp line 3858

change
int sv = getLongValue( pRoot, "showVersionNumber", 0, 1, 0 );
to
int sv = getLongValue( pRoot, "showVersionNumber", 0, 2, 0 );

then recompile.
Thank you, I'll make a patch for my packaged version.

edit:
Your fix doesn't hide the server header: sv is passed to HttpServerVersion::hideDetail but hideDetail only check if is 0 or not 0.

I've made a patch that should give the correct behaviour (as per tip in the configuration interface about the meaning of showVersionNumber).

http://pastebin.com/DVxEhHBi
 
Last edited:
Top