ankitpokhrel / ankitpokhrel/tus-php

Client implementation overly restrictive on HEAD requests

Open
#455 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
PHP
Stars
1.5k
Forks
220
PR merge metrics
No merged PRs in 30d

Description

> **Note:** Please report any security issues directly to hello [at] ankit.pl

**Describe the bug**
`sendHeadRequest` implementation in the Client only expects a 200-level status. The [spec](https://tus.io/protocols/resumable-upload#head) says a server SHOULD return 200 or 204, so the client should probably at least allow 204 statuses.

**To Reproduce**
Use the client to connect to a Tus server that returns a 204 status code on HEAD requests.

**Expected behavior**
Head request is treated according to the specification and uploading continues as expected.

I've prepared #454 as a fix.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.