-
Notifications
You must be signed in to change notification settings - Fork 851
Closed
Description
Proposal
Deprecate below two functions of the MIMEField
const char *name_get(int *length) const;
const char *value_get(int *length) const;
Background
MIMEField has two value_get functions return std::string_view and const char *.
trafficserver/proxy/hdrs/MIME.h
Lines 162 to 164 in f9aa1e0
| /// @return The value of @a this field. | |
| std::string_view value_get() const; | |
| const char *value_get(int *length) const; |
Discussion on #10144, std::string_view value_get() const; is preferred for error handling and I completely agree with using std::string_view.
We can say the same things for name_get too.
trafficserver/proxy/hdrs/MIME.h
Lines 144 to 146 in f9aa1e0
| /// @return The name of @a this field. | |
| std::string_view name_get() const; | |
| const char *name_get(int *length) const; |
Concerns
These functions are used widely. The change will be big.
Reactions are currently unavailable