You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2014/02/11 16:00:15 UTC

[Bug 56128] New: mod_lua doesn't provide ways to set cookie attributes

https://issues.apache.org/bugzilla/show_bug.cgi?id=56128

            Bug ID: 56128
           Summary: mod_lua doesn't provide ways to set cookie attributes
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_lua
          Assignee: bugs@httpd.apache.org
          Reporter: Chaosed0@gmail.com

When handling a request in a lua script, request:setcookie() is provided to add
cookies to the response. The cookie's expiry can be set, but there doesn't seem
to be any way to add other attributes to the cookie, i.e. Path, Domain,
HTTPOnly, and Secure.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56128] mod_lua doesn't provide ways to set cookie attributes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56128

Daniel Gruno <hu...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Daniel Gruno <hu...@apache.org> ---
Fixed/Upgraded in trunk, thanks for the input!
I've put you down as the author, as this was basically your idea - I just
contributed the code in a slightly manic frenzy.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56128] mod_lua doesn't provide ways to set cookie attributes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56128

--- Comment #3 from Edward Lu <Ch...@gmail.com> ---
Whoops, I missed the Secure flag - probably because I was just running through
all the cookie attributes and listing them in my comment :)

I think the table solution would be the way to go. Having that many arguments
would be a bit cumbersome. I'll try to write a patch up sometime, but I'm
actually not too familiar with Lua.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56128] mod_lua doesn't provide ways to set cookie attributes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56128

Eric Covener <co...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56128] mod_lua doesn't provide ways to set cookie attributes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56128

--- Comment #5 from Daniel Gruno <hu...@apache.org> ---
Backported to 2.4.x in r1570162.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56128] mod_lua doesn't provide ways to set cookie attributes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56128

--- Comment #2 from Daniel Gruno <hu...@apache.org> ---
Alternately, we could make mod_lua accept a table with values:

r:setcookie{
  key = "foo",
  value = "bar",
  secure = true,
  expires = os.time() + 86400,
  path = "/"
  httponly = false,
  domain = "foobar.com"
}

And default to nothing if the table element isn't present

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 56128] mod_lua doesn't provide ways to set cookie attributes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56128

--- Comment #1 from Daniel Gruno <hu...@apache.org> ---
secure can be set using a boolean value (as documented).
As for the rest, we're looking into adding these things to 2.4.8.
Patches are welcome :)

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org