Skip to content

Conversation

@mitjap
Copy link
Collaborator

@mitjap mitjap commented Oct 1, 2022

I made a mistake in #297 thinking that either Upload-Length or Upload-Defer-Length headers MUST be present. This PR fixes this.

We don't need to validate Upload-Defer-Length as it is not expected to be present. Upload-Length can ONLY be present if extension is supported, and upload length is not yet known.

@mitjap mitjap requested a review from Murderlon October 1, 2022 02:40
@mitjap mitjap force-pushed the fix-patch-handler-upload-length branch from 5efd1d7 to 75b317a Compare October 1, 2022 02:42
@Murderlon
Copy link
Member

Test is still failing:

   1 failing

  1) PostHandler
       send()
         events
           must not fire the EVENT_UPLOAD_COMPLETE event when upload-length is defered:
     Error: done() invoked with non-Error: {"status_code":501,"body":"creation-defer-length extension is not (yet) supported.\n"}
  

@Murderlon Murderlon merged commit 63b7330 into master Oct 3, 2022
@Murderlon Murderlon deleted the fix-patch-handler-upload-length branch October 3, 2022 18:25
Murderlon added a commit that referenced this pull request Oct 3, 2022
* 1.x:
  0.8.1
  Fix validation of upload-length header in patch handler (#303)
  Bump @google-cloud/storage from 6.4.1 to 6.5.2 (#304)
  Bump aws-sdk from 2.1206.0 to 2.1227.0 (#305)
  Revert "Bump tus-js-client from 2.3.1 to 3.0.0" (#302)
  Emit upload complete event when using creation-with-upload extension (#301)
  GCS: fix error handling when checking for bucket existence (#299)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants