bluetianx / BirdMessenger

DotNET client implementation of the Tus protocol for resumable file uploads.
https://tus.io/
MIT License
63 stars 12 forks source link

HttpHeaders not passed to all requests #51

Closed raV720 closed 1 year ago

raV720 commented 1 year ago

When calling TusPatchAsync() method there are multiple http requests underneath. When passing TusPatchRequestOption with custom HttpHeaders this headers are not passed to all of this http requests. The TusHeadAsync() method is called without custom headers:

https://github.com/bluetianx/BirdMessenger/blob/edd8325fc46b7c69849b6e9c55f63400efd9933c/src/BirdMessenger/HttpClientExtension.cs#L181 and here: https://github.com/bluetianx/BirdMessenger/blob/edd8325fc46b7c69849b6e9c55f63400efd9933c/src/BirdMessenger/HttpClientExtension.cs#L330

I believe it is not expected behavior. I am not sure if this is the only place with such problem.

bluetianx commented 1 year ago

When calling TusPatchAsync() method there are multiple http requests underneath

For sure. because the client needs to know the offset of the file you want to upload

When passing TusPatchRequestOption with custom HttpHeaders this headers are not passed to all of this http requests. The TusHeadAsync() method is called without custom headers:

Thank you very much, It is indeed a bug. I will fix it on the weekend.

bluetianx commented 1 year ago

I have fixed it in the 3.1.1 version. @raV720