Skip to content

Commit

Permalink
Parse request cookies.
Browse files Browse the repository at this point in the history
  • Loading branch information
lparenteau committed Jun 16, 2012
1 parent 4aac547 commit 1785b66
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions r/request.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
set:(fieldname="HOST")!(fieldname="CONNECTION") value=$$FUNC^%UCASE(value)

if fieldname="CONNECTION" set connection(fieldname)=value
else if fieldname="COOKIE" do if 1
. for do quit:value=""
. . set request("headers",fieldname,$ztranslate($zpiece(value,"=")," "))=$zpiece($zextract(value,$zfind(value,"="),$zlength(value)),";")
. . set value=$select($zfind(value,";"):$zextract(value,$zfind(value,";"),$zlength(value)),1:"")
else set request("headers",fieldname)=value

quit
Expand Down

0 comments on commit 1785b66

Please sign in to comment.