Skip to content

Use HEAD request instead of GET when checking if the public URL is correct#3092

Open
miku-orb wants to merge 1 commit into
gbif:masterfrom
IB-PAN:patch_xhr_head_instead_of_get
Open

Use HEAD request instead of GET when checking if the public URL is correct#3092
miku-orb wants to merge 1 commit into
gbif:masterfrom
IB-PAN:patch_xhr_head_instead_of_get

Conversation

@miku-orb

Copy link
Copy Markdown

This is a very tiny thing, but it caught my attention while looking throughout the codebase.

Using a GET request here is wasteful, while HEAD is semantically the same, but allows avoiding the transfer of the actual file's body, which we don't care about when testing just if the HTTP response is 200 OK.

I did test that it still works (and it has to work with any HTTP server that isn't completely broken).

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.

1 participant