Github user jacksontj commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/636#discussion_r63214912
--- Diff: proxy/http/HttpTransact.cc ---
@@ -3460,7 +3460,7 @@ HttpTransact::HandleStatPage(State *s)
s->hdr_info.client_response.value_set(MIME_FIELD_CONTENT_TYPE,
MIME_LEN_CONTENT_TYPE, s->internal_msg_buffer_type, len);
}
} else {
- s->hdr_info.client_response.value_set(MIME_FIELD_CONTENT_TYPE,
MIME_LEN_CONTENT_TYPE, "text/plain", 9);
+ s->hdr_info.client_response.value_set(MIME_FIELD_CONTENT_TYPE,
MIME_LEN_CONTENT_TYPE, "text/plain", 10);
--- End diff --
I agree, but this is apparently a very common pattern (the magic numbers
all over)-- so I fixed the number in an attempt to be consistent. I'm fine to
change it though-- it just won't match :/ Maybe we should make another ticket
for cleaning these sorts of things up? Is there a linter that can check for
magic numbers? (so we can make an automated check for them)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---