Giter Site home page Giter Site logo

cl-cookie's People

Contributors

fukamachi avatar vlnx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cl-cookie's Issues

Error compiling cl-cookie when fetching dexador

Running (ql:quickload "dexador") gives me the following error:

................
; 
; compilation unit aborted
;   caught 1 fatal ERROR condition
;   caught 1 ERROR condition
To load "dexador":
  Load 1 ASDF system:
    dexador
; Loading "dexador"
[package cl-cookie].

; file: /Users/adrienblavier/quicklisp/dists/quicklisp/software/cl-cookie-20220707-git/src/cl-cookie.lisp
; in: DEFUN GET-TZ-OFFSET
;     (SYMBOL-MACROLET ((CL-COOKIE::TIMEZONES
;                        LOCAL-TIME::*ABBREVIATED-SUBZONE-NAME-
;                        NIL
;                        LOCAL-TIME::TIMEZONE-LIST*))
;       (LET* ((CL-COOKIE::TZ
;               (GETHASH CL-COOKIE::TZ-ABBREV CL-COOKIE::TIMEZONES NIL))
;              (CL-COOKIE::TZ
;               (IF CL-COOKIE::TZ
;                   #
;                   #)))
;         (WHEN CL-COOKIE::TZ
;           (LOOP CL-COOKIE::FOR CL-COOKIE::SUB CL-COOKIE::ACROSS (LOCAL-TIME::TIMEZONE-SUBZONES
;                                                                  CL-COOKIE::TZ)
;                 WHEN (EQUAL CL-COOKIE::TZ-ABBREV #)
;                 DO (RETURN #)))))
; 
; caught ERROR:
;   malformed symbol/expansion pair: (TIMEZONES *ABBREVIATED-SUBZONE-NAME- NIL
;                                     TIMEZONE-LIST*)
...............

write-cookie-header only writes cookie name and value

First, thank you for all you do for Common Lisp and its community.

I see that write-cookie-header only writes a cookie's name and value while ignoring its other fields. For example,

(cl-cookie:write-cookie-header
 (cl-cookie:make-cookie :name "name" :value "test" :path "/" :secure-p t :expires (encode-universal-time 6 22 19 25 1 2002)))

yields "name=test" instead of the expected "name=test; Expires=Sat, 26 Jan 2002 00:22:06 GMT; Path=/; Secure".

What is the rationale behind this implementation? Should write-cookie-header also handle a cookie's auxiliary attributes?

Have #'parse-set-cookie-header parse concatenated Set-Cookie values

In my project I receive the Set-Cookie value from soup-message-headers-get-list.
That function concatenates the multiple headers down to the allowed format defined in rfc2612 section 4.2.

Current result:

COOKIE> (parse-set-cookie-header
         "name1=value; path=/; domain=.example.com; HttpOnly, name2=value; domain=.example.com; path=/; HttpOnly"
         "example.com" "/")
#S(COOKIE
   :NAME "name1"
   :VALUE "value"
   :EXPIRES NIL
   :PATH "/"
   :DOMAIN ".example.com"
   :SECURE-P NIL
   :HTTPONLY-P T
   :ORIGIN-HOST "example.com")

Desired result:

COOKIE> (parse-set-cookie-header
         "name1=value; path=/; domain=.example.com; HttpOnly, name2=value; domain=.example.com; path=/; HttpOnly"
         "example.com" "/")
(#S(COOKIE
    :NAME "name1"
    :VALUE "value"
    :EXPIRES NIL
    :PATH "/"
    :DOMAIN ".example.com"
    :SECURE-P NIL
    :HTTPONLY-P T
    :ORIGIN-HOST "example.com")
   #S(COOKIE
      :NAME "name2"
      :VALUE "value"
      :EXPIRES NIL
      :PATH "/"
      :DOMAIN ".example.com"
      :SECURE-P NIL
      :HTTPONLY-P T
      :ORIGIN-HOST "example.com"))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.