ramarao1990 / openid4java

Automatically exported from code.google.com/p/openid4java
Apache License 2.0
0 stars 0 forks source link

3 HTTP requests used for Discovery #42

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
A Relying Party (RP) should generally only need 1 HTTP request during
discovery. A GET request that includes the application/xrds+xml MIME type
in an Accept header should suffice. If the result is a Yadis doc use that;
otherwise if it is HTML (or XHTML) parse that for <link rel="openid…"…>
elements.

What steps will reproduce the problem?
Using java-openid-sxip-0.9.4.339/samples/simple-openid:
1. Enter a OpenID v1.1 URL that has a <link rel="openid.server"…> element,
but no Yadis document;
2. Look at the access logs for the web server hosting the OpenID URL.

What is the expected output? What do you see instead?
I expect to see 1 GET request.
Instead I see a HEAD request followed by 2 GET requests.

What version of the product are you using? On what operating system?
java-openid-sxip-0.9.4.339
java version "1.6.0_01"
SunOS 5.9

Please provide any additional information below.
My guess is that the first HEAD is expecting a X-XRDS-Location header; the
next GET is looking for a application/xrds+xml doc; and the last GET is
looking for [X]HTML.
An initial HEAD MAY make sense if the bulk of users have Yadis docs AND
they use servers that can insert a X-XRDS-Location HTTP header but NOT do
content negotiation. This circumstance seems highly improbable.
There is no excuse for the 2 GETs. Keeping Yadis discovery and HTML
discovery code totally separate is my guess at a reason, but it is a poor
excuse.

Original issue reported on code.google.com by c799...@gmail.com on 5 Nov 2007 at 5:29

GoogleCodeExporter commented 8 years ago

Original comment by Johnny.B...@gmail.com on 20 Nov 2007 at 1:08

GoogleCodeExporter commented 8 years ago
This is implemented in rev 418. Will leave the issue open until the new code 
gets 
some real-world testing / validation.

Johnny

Original comment by Johnny.B...@gmail.com on 22 Nov 2007 at 6:25

GoogleCodeExporter commented 8 years ago

Original comment by Johnny.B...@gmail.com on 22 Nov 2007 at 6:25

GoogleCodeExporter commented 8 years ago

Original comment by Johnny.B...@gmail.com on 22 Jan 2008 at 7:01

GoogleCodeExporter commented 8 years ago
. 
‏‏قد يوجد خطأ كتابة في العنوان

Original comment by sl44ta...@gmail.com on 23 Sep 2011 at 6:44