luoyuliuyin opened a new pull request, #45546:
URL: https://github.com/apache/airflow/pull/45546
### Apache Airflow version
main (development)
### How to reproduce
POST request with `content-type` as `application/json; charset=utf-8`
```
curl -X 'PATCH' \
'https://you_host_com/api/v1/dags/dag_id/dagRuns/run_id' \
-H 'accept: application/json' \
-H 'Content-Type: application/json; charset=utf-8' \
-d '{
"state": "success"
}'
```
### Problem Description
When an API call is made, if the API has the `@action_logging` annotation,
the event will be recorded in the db `log` table as follows

### Related Code
Currently, whether the current request contains json_body is determined by
judging whether `request.headers.get("content-type")` is equal to
`application/json`. The relevant code is as follows

But in many cases, the `content-type` contains other information besides
`application/json`, such as `application/json; charset=utf-8`. In this case,
the database will not record valid information.

### Solution
So the judgment condition should be changed to include
--
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]