Opened 10 years ago
Closed 10 years ago
#38817 closed defect (bug) (fixed)
REST API: Store the user_agent by default in the comments API
| Reported by: | dd32 | Owned by: | rachelbaker |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.7 |
| Component: | Comments | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests commit |
| Cc: | Focuses: | rest-api |
Description
The comments API currently doesn't store the user_agent by default, unless the client specifies it.
As the user_agent field is a user-controllable field, I see no issue with allowing it to be set through the REST API parameters, however believe that it should default to $_SERVER['HTTP_USER_AGENT'] when not specified by the client.
Attachments (2)
Change History (5)
#2
@
10 years ago
- Keywords has-unit-tests commit added; needs-unit-tests removed
38817.2.diff Adds the space in the empty conditional and also includes a unit test.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Needs tests and missing an operator space:
!empty→! empty. Otherwise makes sense to me.