bneradt commented on code in PR #10306:
URL: https://github.com/apache/trafficserver/pull/10306#discussion_r1315090311
##########
doc/admin-guide/files/records.yaml.en.rst:
##########
@@ -4254,6 +4254,14 @@ OCSP Stapling Configuration
Number of seconds before an OCSP response expires in the stapling cache.
+.. ts:cv:: CONFIG proxy.config.ssl.ocsp.request_mode INT 0
+
+ Set the request method to prefer when querying OCSP responders. The default
+ is zero, or POST, and a value of 1 will cause ATS to attempt a GET request.
+ Because the length of the encoded request must be less than 255 bytes per
RFC
+ 6960, Appendix A, ATS will fall back to the POST request method when the
+ encoded size exceeds this limit.
+
Review Comment:
As it is, it seems like it would be clearer to name this "prefer_get_method"
or some such, and 1 enables it. Are you anticipating other possible
configurations that might be set for this?
##########
iocore/net/OCSPStapling.cc:
##########
@@ -308,10 +315,10 @@ class HTTPRequest : public Continuation
sin.sin_port = 65535;
this->_fsm = FetchSMAllocator.alloc();
- if (use_post) {
- this->_fsm->ext_init(this, "POST", uri, "HTTP/1.1",
reinterpret_cast<sockaddr *>(&sin), TS_FETCH_FLAGS_SKIP_REMAP);
- } else {
+ if (use_get) {
this->_fsm->ext_init(this, "GET", uri, "HTTP/1.1",
reinterpret_cast<sockaddr *>(&sin), TS_FETCH_FLAGS_SKIP_REMAP);
+ } else {
+ this->_fsm->ext_init(this, "POST", uri, "HTTP/1.1",
reinterpret_cast<sockaddr *>(&sin), TS_FETCH_FLAGS_SKIP_REMAP);
}
Review Comment:
I suggest setting the char* in a conditional:
```cpp
char const *const method = use_get ? "GET": "POST";
this->_fsm->ext_init(this, method, uri, "HTTP/1.1",
reinterpret_cast<sockaddr *>(&sin), TS_FETCH_FLAGS_SKIP_REMAP);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]