You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "maskit (via GitHub)" <gi...@apache.org> on 2023/04/17 18:13:11 UTC

[GitHub] [trafficserver] maskit commented on a diff in pull request #9615: Ensure a reason phrase when sending an HTTP/1 response

maskit commented on code in PR #9615:
URL: https://github.com/apache/trafficserver/pull/9615#discussion_r1169111595


##########
proxy/http/HttpTransact.cc:
##########
@@ -7834,7 +7834,13 @@ HttpTransact::build_response(State *s, HTTPHdr *base_response, HTTPHdr *outgoing
                              HTTPStatus status_code, const char *reason_phrase)
 {
   if (reason_phrase == nullptr) {
-    reason_phrase = http_hdr_reason_lookup(status_code);
+    if (status_code != HTTP_STATUS_NONE) {
+      Debug("http_transact", "Using reason phrase from status %d: %s", status_code, reason_phrase);

Review Comment:
   reason_phrase is always nullptr here.



-- 
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: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org