apache / apache/pinot

Make HTTP header not use underscore

Open
#9,881 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.1k
Forks
1.5k
Avg merge
2d 55m
Merged PRs (30d)
182

Description

Usually it's fine, however we observed many cases that when users put pinot controller/brokers behind a nginx reverse proxy, then it will by default drop headers with underscore.

For now at least we should put header with both underscore and hyphen.

Sample headers causing problem: `DOWNLOAD_URI` and `UPLOAD_TYPE` in segment upload.

The temporary fix comes from nginx directly, users need to explicitly set `underscores_in_headers on;`
ref: https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#missing-disappearing-http-headers

cc: @zhtaoxiang @npawar @mayankshriv

Contributor guide

Open the contributing guide

Research direction

Start by searching the segment upload handling for the DOWNLOAD_URI and UPLOAD_TYPE headers. Check how those headers are emitted and verify that clients behind nginx can receive both underscore and hyphen forms without requiring underscores_in_headers; add or update the relevant request/response test if one is found nearby.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, nginx
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.