mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-03-25 08:55:53 +00:00
Cookie#origin=: Add a comment to explain why @origin is set the last.
This commit is contained in:
parent
a0202e2192
commit
3d4f0a65ff
1 changed files with 1 additions and 0 deletions
|
|
@ -447,6 +447,7 @@ class HTTP::Cookie
|
|||
return origin if origin == @origin
|
||||
@origin.nil? or
|
||||
raise ArgumentError, "origin cannot be changed once it is set"
|
||||
# Delay setting @origin because #domain= or #path= may fail
|
||||
origin = URI(origin)
|
||||
if URI::HTTP === origin
|
||||
self.domain ||= origin.host
|
||||
|
|
|
|||
Loading…
Reference in a new issue