# Period(.) is used in cokie name

**URL:** <https://www.ruby-forum.com/t/period-is-used-in-cokie-name/218169>\
**Category:** NGINX\
**Created:** [March 23, 2012, 2:56am UTC](https://www.ruby-forum.com/t/period-is-used-in-cokie-name/218169 "2012-03-23T02:56:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 23, 2012, 2:56am UTC](https://www.ruby-forum.com/t/period-is-used-in-cokie-name/218169/1 "2012-03-23T02:56:32Z")

</div>

Hello

One of my clients use period(.) as cookie name start.  
(ex Set-Cookie: .blabla=abcd)

Is it possible to use period(.) in a cookie name?

If possible, how can I use $cookie\_COOKIE variable ?

Best Regards

---

<div class="post-metadata">

**Author:** ![chaepil\_lim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/0ea827/32.png) [@chaepil\_lim](https://www.ruby-forum.com/u/chaepil_lim)\
**Post date:** [March 23, 2012, 10:20am UTC](https://www.ruby-forum.com/t/period-is-used-in-cokie-name/218169/2 "2012-03-23T10:20:27Z")

</div>

On 23 March 2012 02:56, chaepil lim [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hello
> 
> One of my clients use period(.) as cookie name start.  
> (ex Set-Cookie: .blabla=abcd)
> 
> Is it possible to use period(.) in a cookie name?

I don’t know if things have improved since  
[Dotted cookie name as proxy\_cache\_key problem - NGINX - Ruby-Forum](http://www.ruby-forum.com/topic/205828) …

Jonathan

---

<div class="post-metadata">

**Author:** ![chaepil\_lim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/0ea827/32.png) [@chaepil\_lim](https://www.ruby-forum.com/u/chaepil_lim)\
**Post date:** [March 23, 2012, 2:24pm UTC](https://www.ruby-forum.com/t/period-is-used-in-cokie-name/218169/3 "2012-03-23T14:24:23Z")

</div>

On Mar 22, 2012, at 9:56 PM, chaepil lim wrote:

> If possible, how can I use $cookie\_COOKIE variable ?

I think you can access those in embedded Lua or Perl.

---

<div class="post-metadata">

**Author:** ![chaepil\_lim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/0ea827/32.png) [@chaepil\_lim](https://www.ruby-forum.com/u/chaepil_lim)\
**Post date:** [March 23, 2012, 2:41pm UTC](https://www.ruby-forum.com/t/period-is-used-in-cokie-name/218169/4 "2012-03-23T14:41:58Z")

</div>

Hello!

On Fri, Mar 23, 2012 at 09:23:46AM -0400, Brian A. wrote:

> On Mar 22, 2012, at 9:56 PM, chaepil lim wrote:
> 
> > If possible, how can I use $cookie\_COOKIE variable ?
> 
> I think you can access those in embedded Lua or Perl.

Just vanilla map module should do the trick (if/set will do too,  
but map is better).

The link already provided in this thread contains if/set based  
solution. Map-based solution will be similar (it’s now possible  
as regexp support was added to map module).

Maxim D.
