HumanSignal / HumanSignal/label-studio

Label-studio behind a proxy fails to reimport

Open
#2,451 0 comments 0 reactions 1 assignee Claimed by @makseq View on GitHub
import problem
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

**Describe the bug**
PR https://github.com/heartexlabs/label-studio/pull/1044 introduces an early return for empty reimports. However, it responds with `204`.

While that may seem a good choice, it is also wrong. According to the specification [1][2] `204` should not have a body.

This is not a problem when trying to access label-studio from a browser. As the documentation says, browsers have fault tolerance for this issue. The problem arises when using label-studio with postman or behind a proxy.

In my case, I am running label-studio behind a node/express/http-proxy-middleware proxy, which apparently adheres to the specification very strictly. In the case of label-studio this translates to label-studio failing to receive a response from the reimport and hanging.

[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204
[2] https://restfulapi.net/http-status-204-no-content/

**To Reproduce**
It is fairly easy as I said, using a node/express/http-proxy-middleware stack , as well as using a tool like Postman.

**Expected behavior**
The expected behavior is a given for everyone I guess. Responses should reach label-studio, even if label-studio is behind a proxy.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.