RichardSisonFerrer / oauth

Automatically exported from code.google.com/p/oauth
0 stars 0 forks source link

The path of CookieMap should not be empty. #171

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set the CookieConsumer as root context
2. Use that consumer throught IE 8 
3. IE 8 cannot put the cookies.

What is the expected output? What do you see instead?

Cookies are put on IE 8

Please use labels and text to provide additional information.

The constructor of CookieMap should be modified.

this.path = request.getContextPath();
-> this.path = "".equals(request.getContextPath()) ? "/" : 
request.getContextPath();

There are no problem on FireFox and Chrome.

Original issue reported on code.google.com by virg...@gmail.com on 4 Jun 2010 at 7:29

GoogleCodeExporter commented 9 years ago
Which library is this related to?

Original comment by morten.f...@gmail.com on 12 Jun 2010 at 8:45

GoogleCodeExporter commented 9 years ago
Sorry, Java library.

Original comment by virg...@gmail.com on 13 Jun 2010 at 4:00

GoogleCodeExporter commented 9 years ago

Original comment by morten.f...@gmail.com on 29 Mar 2011 at 6:01

GoogleCodeExporter commented 9 years ago
Firefox 5 does not work either.

The patch:

Index: 
example/webapp/src/main/java/net/oauth/example/consumer/webapp/CookieMap.java
===================================================================
--- 
example/webapp/src/main/java/net/oauth/example/consumer/webapp/CookieMap.java   (r
evision 1262)
+++ 
example/webapp/src/main/java/net/oauth/example/consumer/webapp/CookieMap.java   (w
orking copy)
@@ -35,7 +35,7 @@

     public CookieMap(HttpServletRequest request, HttpServletResponse response) {
         this.response = response;
-        this.path = request.getContextPath();
+        this.path = request.getContextPath() + "/";
         Cookie[] cookies = request.getCookies();
         if (cookies != null) {
             for (Cookie cookie : cookies) {

Original comment by zhoushu...@gmail.com on 1 Jul 2011 at 12:49