Skip to content

[p5.js 2.0 Bug Report]: Font loading fails sometimes due to HTTP HEAD usage #8269

@davepagurek

Description

@davepagurek

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

2.x

Web browser and version

Chrome

Operating system

MacOS

Steps to reproduce this

Steps:

  1. Upload a font to Amazon S3 without public read access
  2. Generate a signed URL to access the file with
  3. Try to load it with p5 2.x

That sounds pretty specific and contrived haha. But it turns out S3 doesn't let you generate signed URLs that work both with HEAD and with GET, it's one verb per method. Our font loading does both on the same URL so it means these kinds of resources will not be able to be loaded.

We could catch a failed HEAD and use a GET instead though.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions