Graylog2 / Graylog2/graylog2-server

Custom HTTP Notification appends charset=utf-8 to application/x-www-form-urlencoded causing incompatible requests

Ouverte
#26,653 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug triaged
Langage dominant
Java
Étoiles
8.1k
Forks
1.1k
Merge moyen
1 j 20 h
PR mergées (30 j)
217

Description

### Environment

- Graylog: 6.0.12
- Notification type: Custom HTTP Notification

### Problem

Custom HTTP Notification always sends

```
Content-Type: application/x-www-form-urlencoded; charset=utf-8
```

instead of

```
Content-Type: application/x-www-form-urlencoded
```

The `charset=utf-8` cannot be removed or overridden.

### Target API

VK Teams Bot API

Endpoint:

```
https://myteam.mail.ru/bot/v1/messages/sendText
```

### Expected behavior

Graylog should send

```
Content-Type: application/x-www-form-urlencoded
```

without automatically appending charset.

### Actual behavior

Graylog sends

```
Content-Type: application/x-www-form-urlencoded; charset=utf-8
```

The request reaches the server, but VK Teams rejects or ignores it.

### Verification

The same request works correctly from:

- curl
- Postman

Example:

```
curl -X POST \
https://myteam.mail.ru/bot/v1/messages/sendText \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "token=..." \
--data-urlencode "chatId=..." \
--data-urlencode "text=test"
```

If

```
charset=utf-8
```

is added to Content-Type, the request no longer works.

This was verified using:

- curl
- Postman
- Webhook.site

Webhook.site confirms that Graylog correctly sends:

- POST
- x-www-form-urlencoded
- correct request body

The only visible difference is the automatically appended charset.

### Additional information

The Headers field cannot override the generated Content-Type header.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start at the Custom HTTP Notification implementation and trace where its form request builds the Content-Type header. Reproduce the request against the VK Teams endpoint or Webhook.site, then verify that the completed request uses application/x-www-form-urlencoded without charset=utf-8 and that the Headers field behavior remains understood.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
api, backend
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Calme
Clarté
Clairement spécifiée
Accessibilité débutants
72/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.