Closed jonjensen closed 4 years ago
@jonjensen do you think we could add a basic unit test for this? It looks like an object that can('get_sslversion')
should mostly do the trick.
@oalders When I went to look at this, it seemed reasonable to add these artificial response header tests to the existing live apache.org request tests, rather than mocking a socket class. So I did that to t/apache.t
and pushed a new commit.
Maybe it's overengineered or something that really would be better as a unit test rather than an integration test. Let me know what you think.
@jonjensen thanks for this! The live tests can be somewhat brittle, but I think the Apache tests have historically been pretty good, so this should be fine.
I have often used the extra response headers to troubleshoot a connection, e.g.:
but I also need to know the TLS version being used (1.2 or 1.3 in this case).
I didn't see a way to tell that, so figured adding the same kind of header for the version # would make sense.
Please let me know if there's already a way, or a better way to do this. Thanks!