Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
016dabcf
Commit
016dabcf
authored
12 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
HTTP-COOKIES: clarified and modified layout
parent
ae8f08ee
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/HTTP-COOKIES
+22
-14
22 additions, 14 deletions
docs/HTTP-COOKIES
with
22 additions
and
14 deletions
docs/HTTP-COOKIES
+
22
−
14
View file @
016dabcf
...
...
@@ -8,15 +8,18 @@ Updated: July 3, 2012 (http://curl.haxx.se/docs/http-cookies.html)
HTTP Cookies
1. Cookie overview
2. Cookies saved to disk
3. Cookies with curl the command line tool
4. Cookies with libcurl
5. Cookies with javascript
1. HTTP Cookies
1.1 Cookie overview
1.2 Cookies saved to disk
1.3 Cookies with curl the command line tool
1.4 Cookies with libcurl
1.5 Cookies with javascript
==============================================================================
1. Cookie overview
1. HTTP Cookies
1.1 Cookie overview
HTTP cookies are pieces of 'name=contents' snippets that a server tells the
client to hold and then the client sends back those the server on subsequent
...
...
@@ -36,18 +39,21 @@ HTTP Cookies
In 2011, RFC6265 (http://www.ietf.org/rfc/rfc6265.txt) was finally published
and details how cookies work within HTTP.
2
.
Cookies saved to disk
1.
2 Cookies saved to disk
Netscape once created a file format for storing cookies on disk so that they
would survive browser restarts. curl adopted that file format to allow
sharing the cookies with browsers, only to see browsers move away from that
format. Modern browsers no longer use it, while curl still does.
The cookie file format stores one cookie per physical line in the file with
a bunch of associated meta data, each field separated with TAB. That file is
called the cookiejar in curl terminology.
The netscape cookie file format stores one cookie per physical line in the
file with a bunch of associated meta data, each field separated with
TAB. That file is called the cookiejar in curl terminology.
When libcurl saves a cookiejar, it creates a file header of its own in which
there is a URL mention that will link to the web version of this document.
3
.
Cookies with curl the command line tool
1.
3 Cookies with curl the command line tool
curl has a full cookie "engine" built in. If you just activate it, you can
have curl receive and send cookies exactly as mandated in the specs.
...
...
@@ -70,9 +76,11 @@ HTTP Cookies
tell curl to start the cookie engine and write cookies to the given file
after the request(s)
4
.
Cookies with libcurl
1.
4 Cookies with libcurl
libcurl options:
libcurl offers several ways to enable and interface the cookie engine. These
options are the ones provided by the native API. libcurl bindings may offer
access to them using other means.
CURLOPT_COOKIE
...
...
@@ -101,7 +109,7 @@ HTTP Cookies
Extract cookie information from the internal cookie storage as a linked
list.
5
.
Cookies with javascript
1.
5 Cookies with javascript
These days a lot of the web is built up by javascript. The webbrowser loads
complete programs that render the page you see. These javascript programs
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment