Replies: 2 comments 4 replies
|
@panva Do you have any thoughts on this one? I'm happy to submit a PR, since I'm probably going to fork this, add |
0 replies
|
I cannot imagine a scenario where a proper user-agent redirect would trigger a HEAD request. I suggest you dig deeper to find out why that's happening before entertaining this in a fork. |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I've been seeing the occasional HTTP 500 response sent from my Passport+OIDC-protected web app, and looking into it, they're all HTTP HEAD requests to my /login route, which is the route that is backed by a
passport.authenticatecall to my OIDC strategy. The HTTP 500 is returned when the strategy hits line 332 ofclient.js, and theswitchdoesn't have acasefor an HTTP HEAD method. But in delving into both the expectations of how servers handle HTTP HEAD requests, and what the strategy is really doing, there shouldn't be any problem for the strategy just handling a HEAD the same way it handles GET requests — e.g., just replacing lines 333-334 inBaseClient.callbackParams:with
I'm happy to submit a PR for this, if folks think it's reasonable — it really does meet the expectations for how the Passport strategy would respond to HEAD requests, and prevents the HTTP 500 internal server errors that shouldn't be happening.
All reactions